Commit e3cc92a6 authored by Paul B Mahol's avatar Paul B Mahol

smacker: fix off by one error

Regression since a93b572a.

Fixes #2426.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 6ce1d873
......@@ -276,7 +276,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment