wavparse: Check that at least 32 bytes are available before parsing smpl chunks

Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-259
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3887

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8042>
This commit is contained in:
Sebastian Dröge 2024-10-04 13:22:02 +03:00 committed by GStreamer Marge Bot
parent c72025cabd
commit 93d79c22a8

View file

@ -894,6 +894,9 @@ gst_wavparse_smpl_chunk (GstWavParse * wav, const guint8 * data, guint32 size)
{
guint32 note_number;
if (size < 32)
return FALSE;
/*
manufacturer_id = GST_READ_UINT32_LE (data);
product_id = GST_READ_UINT32_LE (data + 4);