mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/iff: warn about truncated input to decode_byterun() and clear remaining output
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7fe205e395ed_8988_test.iff Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5eeeb4abf9
commit
b3f44eafa5
@ -499,6 +499,10 @@ static int decode_byterun(uint8_t *dst, int dst_size,
|
||||
}
|
||||
x += length;
|
||||
}
|
||||
if (x < dst_size) {
|
||||
av_log(NULL, AV_LOG_WARNING, "decode_byterun ended before plane size\n");
|
||||
memset(dst+x, 0, dst_size - x);
|
||||
}
|
||||
return buf - buf_start;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user