mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
Change buffer check to avoid an unlikely pointer arithmetic overflow.
Originally committed as revision 18596 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
be50938073
commit
b1e309865f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user