[FFmpeg-cvslog] r15610 - trunk/libavcodec/vp6.c

aurel subversion
Mon Oct 13 02:10:53 CEST 2008


Author: aurel
Date: Mon Oct 13 02:10:53 2008
New Revision: 15610

Log:
vp6dec: ensure we don't try to use a buffer with negative size
this should never happen in valid vp6 bitstream
fix issue684


Modified:
   trunk/libavcodec/vp6.c

Modified: trunk/libavcodec/vp6.c
==============================================================================
--- trunk/libavcodec/vp6.c	(original)
+++ trunk/libavcodec/vp6.c	Mon Oct 13 02:10:53 2008
@@ -135,6 +135,8 @@ static int vp6_parse_header(vp56_context
     if (coeff_offset) {
         buf      += coeff_offset;
         buf_size -= coeff_offset;
+        if (buf_size < 0)
+            return 0;
         if (s->use_huffman) {
             s->parse_coeff = vp6_parse_coeff_huffman;
             init_get_bits(&s->gb, buf, buf_size<<3);




More information about the ffmpeg-cvslog mailing list