Commit 18d1d588 authored by Janne Grunau's avatar Janne Grunau

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".
parent 2af3dc86
...@@ -103,7 +103,7 @@ static int rv30_decode_mb_info(RV34DecContext *r) ...@@ -103,7 +103,7 @@ static int rv30_decode_mb_info(RV34DecContext *r)
GetBitContext *gb = &s->gb; GetBitContext *gb = &s->gb;
int code = svq3_get_ue_golomb(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"); av_log(s->avctx, AV_LOG_ERROR, "Incorrect MB type code\n");
return -1; return -1;
} }
......
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