changeset 9497:cb387dff812d libavcodec

Change buffer check to avoid an unlikely pointer arithmetic overflow.
author reimar
date Fri, 17 Apr 2009 19:49:55 +0000
parents 2c6a58787aeb
children 6abd94fdd827
files xan.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/xan.c	Fri Apr 17 19:48:54 2009 +0000
+++ b/xan.c	Fri Apr 17 19:49:55 2009 +0000
@@ -104,7 +104,7 @@
         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;