mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-05 22:33:37 +00:00
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>
This commit is contained in:
parent
8b43ee4054
commit
2624695484
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user