]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Change buffer check to avoid an unlikely pointer arithmetic overflow.
authorreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 17 Apr 2009 19:49:55 +0000 (19:49 +0000)
committerreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 17 Apr 2009 19:49:55 +0000 (19:49 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18596 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/xan.c

index 99feba0495488531e48257a419c8cf8dcc9fdf1c..b5303eb38bf1dfd039de880c8906e7e79d68befb 100644 (file)
@@ -104,7 +104,7 @@ static int xan_huffman_decode(unsigned char *dest, const unsigned char *src,
         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;