After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682958 - gstvalue: calling gst-launch-1.0 -v -m camerabin segfault
gstvalue: calling gst-launch-1.0 -v -m camerabin segfault
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-29 16:04 UTC by Alban Browaeys
Modified: 2012-08-29 18:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix segfault ini camerabin via gst-launch-1.0 (no flag set) (843 bytes, patch)
2012-08-29 16:04 UTC, Alban Browaeys
committed Details | Review

Description Alban Browaeys 2012-08-29 16:04:38 UTC
Created attachment 222802 [details] [review]
Fix segfault ini camerabin via gst-launch-1.0 (no flag set)

g_flags_get_first_value in gst_value_serialize_flags returns NULL when calling "gst-launch-1.0 -v -m camerabin" .
then the returned value fr is dereferenced (fl->value_name) which segfault.
add a check for not null.
Comment 1 Tim-Philipp Müller 2012-08-29 18:03:36 UTC
Thanks, committed with changes (return "0" instead of ""):

commit 7bf7749c2b3c84a7474b5edac01d06d253d755c8
Author: Alban Browaeys <prahal@yahoo.com>
Date:   Tue Aug 28 07:39:50 2012 +0200

    value: fix crash serialising a 0 flags value when there's no name for it
    
    Fixes segfault when doing gst-launch-1.0 -v -m camerabin
    (encodebin notifies a 0 value for its "flag" property).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682958