[Bug 750596] New: xingmux: FTBFS because of uninitialized variables

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Jun 8 13:48:15 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=750596

            Bug ID: 750596
           Summary: xingmux: FTBFS because of uninitialized variables
    Classification: Platform
           Product: GStreamer
           Version: 1.5.1
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-ugly
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: chris2553 at googlemail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 304815
  --> https://bugzilla.gnome.org/attachment.cgi?id=304815&action=edit
Patch to fix FTBFS

xingmux.c fails to build with the following error log:

make[3]: Entering directory
'/home/chris/rpm/BUILD/gst-plugins-ugly-1.5.1/gst/xingmux'
  CC       libgstxingmux_la-gstxingmux.lo
gstxingmux.c: In function 'generate_xing_header':
gstxingmux.c:320:24: error: 'rate' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
     number_of_frames = gst_util_uint64_scale (duration, rate, GST_SECOND) /
spf;
                        ^
gstxingmux.c:320:75: error: 'spf' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
     number_of_frames = gst_util_uint64_scale (duration, rate, GST_SECOND) /
spf;
                                                                           ^
gstxingmux.c:280:3: error: 'size' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
   } while (size < (4 + xing_offset + 4 + 4 + 4 + 4 + 100) && bitrate < 0xe);
   ^
cc1: all warnings being treated as errors
Makefile:615: recipe for target 'libgstxingmux_la-gstxingmux.lo' failed
make[3]: *** [libgstxingmux_la-gstxingmux.lo] Error 1
make[3]: Leaving directory
'/home/chris/rpm/BUILD/gst-plugins-ugly-1.5.1/gst/xingmux'

The variables are initialized in parse_header(), but that function can return
FALSE if errors occur, leaving the variables uninitialized. The build failure
is fixed by returning NULL (from generate_xing_header() (where the build error
occurs) when parse_header() return FALSE.

Patch attached for comment.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list