mpeg4videoparse: avoid crash if vos < 5 bytes.
authorMichael Smith <msmith@songbirdnest.com>
Wed, 6 Jan 2010 19:20:06 +0000 (11:20 -0800)
committerMichael Smith <msmith@songbirdnest.com>
Wed, 6 Jan 2010 19:20:41 +0000 (11:20 -0800)
gst/mpeg4videoparse/mpeg4videoparse.c

index 93795d0..c5463b5 100644 (file)
@@ -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;