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 501560 - gst_(caps|structure)_from_string() crash if structure name is invalid
gst_(caps|structure)_from_string() crash if structure name is invalid
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal major
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-04 16:18 UTC by Sebastian Dröge (slomo)
Modified: 2007-12-08 12:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
minimal fix (1.23 KB, patch)
2007-12-08 12:55 UTC, Tim-Philipp Müller
committed Details | Review

Description Sebastian Dröge (slomo) 2007-12-04 16:18:30 UTC
Hi,
gst_caps_from_string() can return NULL which should be handled gracefully in gst-python. See https://bugs.launchpad.net/ubuntu/+source/gstreamer0.10/+bug/173118 for an example where it leads to a crash.

Bye
Comment 1 Tim-Philipp Müller 2007-12-08 12:20:56 UTC
This is not a gst-python issue, it crashes in core.
Comment 2 Tim-Philipp Müller 2007-12-08 12:55:13 UTC
Created attachment 100578 [details] [review]
minimal fix
Comment 3 Tim-Philipp Müller 2007-12-08 12:56:21 UTC
 2007-12-08  Tim-Philipp Müller  <tim at centricular dot net>

        * gst/gststructure.c: (gst_structure_validate_name),
          (gst_structure_new_valist), (gst_structure_parse_value),
          (gst_structure_from_string):
          Don't crash in _from_string() if the structure name is not valid
          (fixes #501560).  Allow structure names to start with a number
          again (this apparently broke the ubuntu codec installer).

        * tests/check/gst/gststructure.c: (GST_START_TEST), (GST_START_TEST),
          (GST_START_TEST):
          Add unit test for the crash; update unit tests for new behaviour.