wavparse: Fix clipping of size to the file size
authorSebastian Dröge <sebastian@centricular.com>
Fri, 4 Oct 2024 10:27:27 +0000 (13:27 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 3 Dec 2024 13:51:00 +0000 (13:51 +0000)
commit34cfd6b82c3ae6772b9b43b3f6243f85cea35c38
tree24b1a6af28634daa390293767d569c85a9a72a0c
parent3d2a5841d777dd95afdea30ad134f96c876f84ab
wavparse: Fix clipping of size to the file size

The size does not include the 8 bytes tag and length, so an additional 8 bytes
must be removed here. 8 bytes are always available at this point because
otherwise the parsing of the tag and length right above would've failed.

Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-260
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3888

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8054>
subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c