diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-17 19:49:55 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-17 19:49:55 +0000 |
commit | b1e309865f6b4f67841c811faa5022e492095906 (patch) | |
tree | 440f824902df27ceca2f76971e59c8a7c17ca7ea /libavcodec/xan.c | |
parent | be50938073df1cce26146384ee9316002921063a (diff) | |
download | ffmpeg-b1e309865f6b4f67841c811faa5022e492095906.tar.gz |
Change buffer check to avoid an unlikely pointer arithmetic overflow.
Originally committed as revision 18596 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r-- | libavcodec/xan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c index 99feba0495..b5303eb38b 100644 --- a/libavcodec/xan.c +++ b/libavcodec/xan.c @@ -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; |