From e2da34e6b6e249d69e0c220575dc2e11b695b2e8 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 6 Jan 2010 11:20:06 -0800 Subject: [PATCH] mpeg4videoparse: avoid crash if vos < 5 bytes. --- gst/mpeg4videoparse/mpeg4videoparse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/mpeg4videoparse/mpeg4videoparse.c b/gst/mpeg4videoparse/mpeg4videoparse.c index 93795d04d2..c5463b5e46 100644 --- a/gst/mpeg4videoparse/mpeg4videoparse.c +++ b/gst/mpeg4videoparse/mpeg4videoparse.c @@ -358,6 +358,9 @@ gst_mpeg4vparse_handle_vos (GstMpeg4VParse * parse, const guint8 * data, gboolean equal; bitstream_t bs = { data, 0, 0, size }; + if (size < 5) + goto failed; + /* Parse the config from the VOS frame */ bs.offset = 5; -- 2.34.1