GNOME Bugzilla – Bug 501560
gst_(caps|structure)_from_string() crash if structure name is invalid
Last modified: 2007-12-08 12:56:21 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
This is not a gst-python issue, it crashes in core.
Created attachment 100578 [details] [review] minimal fix
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.