mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 18:02:11 +00:00
svq1dec: Fix overread on very small input
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b21ba20cc8
commit
f7c67536fe
@ -647,6 +647,9 @@ static int svq1_decode_frame(AVCodecContext *avctx,
|
||||
if (s->f_code != 0x20) {
|
||||
uint32_t *src = (uint32_t *) (buf + 4);
|
||||
|
||||
if (buf_size < 36)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
for (i=0; i < 4; i++) {
|
||||
src[i] = ((src[i] << 16) | (src[i] >> 16)) ^ src[7 - i];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user