Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-04-03 16:57:58 +0400
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-04-03 17:16:06 +0400
commitd553a522b969786c3e61350bc9a066a5237b0f52 (patch)
tree312237b278db43c8c59114f059b8704db4e75a11 /libavformat
parent0b6d5f27c811781eed938d6187fe32efa446a57c (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 883a2b7254..84481e22a6 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -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);