[FFmpeg-cvslog] r18589 - trunk/libavcodec/xan.c

reimar subversion
Fri Apr 17 21:07:16 CEST 2009


Author: reimar
Date: Fri Apr 17 21:07:16 2009
New Revision: 18589

Log:
Fix buffer size check for xan_unpack which was broken by r18586

Modified:
   trunk/libavcodec/xan.c

Modified: trunk/libavcodec/xan.c
==============================================================================
--- trunk/libavcodec/xan.c	Fri Apr 17 21:03:43 2009	(r18588)
+++ trunk/libavcodec/xan.c	Fri Apr 17 21:07:16 2009	(r18589)
@@ -156,7 +156,7 @@ static void xan_unpack(unsigned char *de
 
                 back = ((opcode & 0x10) << 12) + 1 + bytestream_get_be16(&src);
                 size2 = *src++ + 5 + ((opcode & 0xc) << 6);
-                if (dest >= dest_end || size > dest_end - dest)
+                if (size + size2 > dest_end - dest)
                     return;
             }
             memcpy(dest, src, size);  dest += size;  src += size;



More information about the ffmpeg-cvslog mailing list