ogg: fix possible buffer overrun
authorMatthew Waters <matthew@centricular.com>
Fri, 8 Apr 2022 01:10:49 +0000 (11:10 +1000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 8 Apr 2022 08:52:45 +0000 (08:52 +0000)
commit62d09f73b72d574d075b68b227710e47c10311d2
tree6ca5ac261139a14b17e4a3e406e94a664e4ae7fc
parent4c98e2d2897355c61d7ed4a3f1ccea04b92a5fcb
ogg: fix possible buffer overrun

If an ogg stream does not match our expectations of how the end of a
buffer may be structured, it was possible to read memory past the end of
the buffer parsed by libogg.  Include a bounds check for this case and
stop parsing.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3930

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2134>
subprojects/gst-plugins-base/ext/ogg/gstoggstream.c
subprojects/gst-plugins-base/ext/ogg/vorbis_parse.c
subprojects/gst-plugins-base/ext/ogg/vorbis_parse.h