Commit f7c67536 authored by Michael Niedermayer's avatar Michael Niedermayer

svq1dec: Fix overread on very small input

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b21ba20c
......@@ -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];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment