wavparse: Make sure enough data for the tag list tag is available before parsing

Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-258
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3886

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8042>
This commit is contained in:
Sebastian Dröge 2024-10-04 13:09:43 +03:00 committed by GStreamer Marge Bot
parent 13b48016b3
commit 4c198f4891

View file

@ -1489,6 +1489,10 @@ gst_wavparse_stream_headers (GstWavParse * wav)
case GST_RIFF_TAG_LIST:{
guint32 ltag;
/* Need at least the ltag */
if (size < 4)
goto exit;
if (wav->streaming) {
const guint8 *data = NULL;