mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/faxcompr: Add missing runs check in decode_uncompressed()
Fixes out of array access Fixes: 54e488b9da4abbceaf405d6492515697/asan_heap-oob_32769b0_160_a8755eb08ee8f9579348501945a33955.TIF Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c9bfd6a8c3
commit
d4a731b84a
@ -189,6 +189,10 @@ static int decode_uncompressed(AVCodecContext *avctx, GetBitContext *gb,
|
||||
*mode = !*mode;
|
||||
if (newmode != *mode) { //FIXME CHECK
|
||||
*(*runs)++ = 0;
|
||||
if (*runs >= runend) {
|
||||
av_log(avctx, AV_LOG_ERROR, "uncompressed run overrun\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
*mode = newmode;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user