diff --git a/ChangeLog b/ChangeLog index f86cb88c4b..8f524de109 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-29 Tim-Philipp Müller + + * gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps): + Protect against unexpected NULL strf_data buffer. + 2006-04-29 Thomas Vander Stichele * tests/check/elements/audioconvert.c: (verify_convert), diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c index 844c5700b3..5277855d44 100644 --- a/gst-libs/gst/riff/riff-media.c +++ b/gst-libs/gst/riff/riff-media.c @@ -879,9 +879,9 @@ gst_riff_create_audio_caps (guint16 codec_id, guint32 subformat_guid[4]; const guint8 *data; - if (GST_BUFFER_SIZE (strf_data) != 22) { + if (strf_data == NULL || GST_BUFFER_SIZE (strf_data) != 22) { GST_WARNING ("WAVE_FORMAT_EXTENSIBLE data size is %d (expected: 22)", - GST_BUFFER_SIZE (strf_data)); + (strf_data) ? GST_BUFFER_SIZE (strf_data) : -1); return NULL; }