Commit ef55c8a6 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

riff-media: Don't recurse in for nested WAVEFORMATEX

There was already a check for that, but it failed because
subformat_guid[0] is a guint32 and that is then casted implicitely to a
guint16 when recursing... just that we checked the uncasted value.

This caused an infinite recursion and thus stack overflow.

https://bugzilla.gnome.org/show_bug.cgi?id=777265
parent 54bf1042
...@@ -1715,7 +1715,8 @@ gst_riff_create_audio_caps (guint16 codec_id, ...@@ -1715,7 +1715,8 @@ gst_riff_create_audio_caps (guint16 codec_id,
caps = gst_caps_new_empty_simple ("audio/x-ac3"); caps = gst_caps_new_empty_simple ("audio/x-ac3");
if (codec_name) if (codec_name)
*codec_name = g_strdup ("wavext AC-3 SPDIF audio"); *codec_name = g_strdup ("wavext AC-3 SPDIF audio");
} else if (subformat_guid[0] == GST_RIFF_WAVE_FORMAT_EXTENSIBLE) { } else if ((subformat_guid[0] & 0xffff) ==
GST_RIFF_WAVE_FORMAT_EXTENSIBLE) {
GST_DEBUG ("WAVE_FORMAT_EXTENSIBLE nested"); GST_DEBUG ("WAVE_FORMAT_EXTENSIBLE nested");
} else { } else {
/* recurse where no special consideration has yet to be identified /* recurse where no special consideration has yet to be identified
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment