Commit 0a590551 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpeg12dec: check for overread in mpeg1_fast_decode_block_inter()

No speedloss meassured
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 746350ea
......@@ -335,7 +335,7 @@ static inline int mpeg1_fast_decode_block_inter(MpegEncContext *s, int16_t *bloc
}
block[j] = level;
if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF || i >= 64)
break;
UPDATE_CACHE(re, &s->gb);
}
......
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