GNOME Bugzilla – Bug 635229
celtenc: uninitialized tags variable can cause segfault
Last modified: 2010-12-07 16:25:49 UTC
In gstceltenc.c, a variable, 'empty_tags', is uninitialized in the gst_celt_enc_create_metadata_buffer() function. If the value is non-NULL, then it is passed to gst_tag_list_free(). This can cause random segmentation violation depending on what is on your stack at the time. Here is a simple patch: --- ext/celt/gstceltenc.c 2010-11-18 15:30:05.391711020 -0800 +++ ext/celt.new/gstceltenc.c 2010-11-18 15:29:40.222616006 -0800 @@ -591,7 +591,7 @@ gst_celt_enc_create_metadata_buffer (GstCeltEnc * enc) { const GstTagList *tags; - GstTagList *empty_tags; + GstTagList *empty_tags = NULL; GstBuffer *comments = NULL; tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (enc));
Thanks for the bug report, this seems to have been fixed: commit b8c0b33536b0e74ed4b2b7ccfd508cdde9ba47b4 Author: Edward Hervey <bilboed@bilboed.com> Date: Thu Nov 25 18:29:31 2010 +0100 celtenc: Initialize variable In the case the tag_setter returns something, empty_tags would be garbage value.