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

reimar subversion
Fri Apr 17 21:49:55 CEST 2009


Author: reimar
Date: Fri Apr 17 21:49:55 2009
New Revision: 18596

Log:
Change buffer check to avoid an unlikely pointer arithmetic overflow.

Modified:
   trunk/libavcodec/xan.c

Modified: trunk/libavcodec/xan.c
==============================================================================
--- trunk/libavcodec/xan.c	Fri Apr 17 21:48:54 2009	(r18595)
+++ trunk/libavcodec/xan.c	Fri Apr 17 21:49:55 2009	(r18596)
@@ -104,7 +104,7 @@ static int xan_huffman_decode(unsigned c
         val = src[val - 0x17 + get_bits1(&gb) * byte];
 
         if ( val < 0x16 ) {
-            if (dest + 1 > dest_end)
+            if (dest >= dest_end)
                 return 0;
             *dest++ = val;
             val = ival;



More information about the ffmpeg-cvslog mailing list