1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

rv30: check block type validity

Prevents crashes with the fuzzed samples from bugs 88, 89 and 125 after
"golomb: avoid infinite loop on all-zero input".
This commit is contained in:
Janne Grunau 2012-02-14 15:02:30 +01:00
parent 2af3dc8698
commit 18d1d5886b

View File

@ -103,7 +103,7 @@ static int rv30_decode_mb_info(RV34DecContext *r)
GetBitContext *gb = &s->gb;
int code = svq3_get_ue_golomb(gb);
if(code > 11){
if (code < 0 || code > 11) {
av_log(s->avctx, AV_LOG_ERROR, "Incorrect MB type code\n");
return -1;
}