aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-08-20 22:09:54 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-20 22:11:50 +0200
commit2624695484cde26baedac10192856ebfd97f2cc7 (patch)
tree02c628ec9afa7a9c5809e8cdbc0e38f51fe196b1
parent8b43ee4054af799e388d380b379a13a60849c1b5 (diff)
downloadffmpeg-2624695484cde26baedac10192856ebfd97f2cc7.tar.gz
avcodec/svq3: fix slice size check
Fixes out of array read Fixes: 09f46aa2175cade93e3e3932646a56a9/asan_heap-oob_4a5385_2995_498f6abfdc0248288cefe5f4b7ad316c.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/svq3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index bb4508cb2a..653a6dba07 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -1040,7 +1040,7 @@ static int svq3_decode_slice_header(AVCodecContext *avctx)
slice_bits = slice_length * 8;
slice_bytes = slice_length + length - 1;
- if (slice_bytes > get_bits_left(&s->gb)) {
+ if (8LL*slice_bytes > get_bits_left(&s->gb)) {
av_log(avctx, AV_LOG_ERROR, "slice after bitstream end\n");
return -1;
}