diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-04-03 12:57:58 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-04-03 15:17:16 +0200 |
commit | 83d5871cf100b4e08ea0e4f5f191e87702561bf3 (patch) | |
tree | e4d8ec6dcd7c44c4d240a97d0ba539588a2baa73 /libavformat | |
parent | bd6e58d5cadd5e5871d930f21f51224b3120cf8f (diff) | |
download | ffmpeg-83d5871cf100b4e08ea0e4f5f191e87702561bf3.tar.gz |
smacker: fix off by one error
Regression since a93b572ae4f517ce0c35cf085167c318e9215908.
Fixes #2426.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit e3cc92a623a6ece42816c7a692c8815688a99ab0)
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 cf1ab858d8..7d2cccdaeb 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -269,7 +269,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 - 1 > 0xff) { av_log(s, AV_LOG_ERROR, "Invalid palette update, offset=%d length=%d extends beyond palette size\n", off, j); |