1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

smacker: fix off-by-one error in palette expanding code

This commit is contained in:
Kostya Shishkov 2013-05-27 06:26:28 +02:00
parent 5f30c6c8ed
commit c3c08baefb

View File

@ -274,7 +274,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
} else if(t & 0x40){ /* copy with offset */
off = avio_r8(s->pb);
j = (t & 0x3F) + 1;
if (off + j > 0xff) {
if (off + j > 0x100) {
av_log(s, AV_LOG_ERROR,
"Invalid palette update, offset=%d length=%d extends beyond palette size\n",
off, j);