diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2013-05-27 06:26:28 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2013-05-27 18:19:08 +0200 |
commit | c3c08baefbf8c9b19c9c1f1bd7a899b697422eea (patch) | |
tree | 53aa88cf54dab7696a10225cde2678962a884e4e /libavformat | |
parent | 5f30c6c8ed1f006c1b3a547dfe388f3a4a080e4d (diff) | |
download | ffmpeg-c3c08baefbf8c9b19c9c1f1bd7a899b697422eea.tar.gz |
smacker: fix off-by-one error in palette expanding code
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/smacker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c index 17c7c529e7..e14424323e 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -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); |