diff --git a/ChangeLog b/ChangeLog index 3c7b176f4e..fd0c66c477 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-16 Thomas Vander Stichele + + * ext/vorbis/vorbisdec.c: (vorbis_dec_src_query): + Fix #327216 (null dereference in vorbisdec) + 2006-01-16 Tim-Philipp Müller * ext/theora/theoradec.c: (theora_handle_comment_packet): diff --git a/ext/vorbis/vorbisdec.c b/ext/vorbis/vorbisdec.c index 6b275aba77..7d65c47be3 100644 --- a/ext/vorbis/vorbisdec.c +++ b/ext/vorbis/vorbisdec.c @@ -274,7 +274,7 @@ vorbis_dec_src_query (GstPad * pad, GstQuery * query) { gint64 granulepos; GstVorbisDec *dec; - gboolean res; + gboolean res = FALSE; dec = GST_VORBIS_DEC (GST_PAD_PARENT (pad)); @@ -307,6 +307,11 @@ vorbis_dec_src_query (GstPad * pad, GstQuery * query) case GST_QUERY_DURATION: { /* query peer for total length */ + if (!gst_pad_is_linked (dec->sinkpad)) { + GST_WARNING_OBJECT (dec, "sink pad %" GST_PTR_FORMAT " is not linked", + dec->sinkpad); + goto error; + } if (!(res = gst_pad_query (GST_PAD_PEER (dec->sinkpad), query))) goto error; break;