dvdspu: Make sure enough data is allocated for the available data
authorSebastian Dröge <sebastian@centricular.com>
Tue, 13 Jun 2023 11:23:47 +0000 (14:23 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 20 Jun 2023 10:07:14 +0000 (10:07 +0000)
commit60226124ec367c2549e4bf1e6174dfb8eca5a63d
tree20d13b9a1eb3f416a33b5880abd5b0279e0a16b7
parent1d9b360708115d4acc3fd4bf13cde066391ed057
dvdspu: Make sure enough data is allocated for the available data

If the size read from the stream is smaller than the currently available
data then the size is bogus and the data should simply be discarded.

Fixes ZDI-CAN-20994
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2660

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4899>
subprojects/gst-plugins-bad/gst/dvdspu/gstspu-pgs.c