From 18d1d5886bb78e4d0e11a2a0193fda765e05805d Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Tue, 14 Feb 2012 15:02:30 +0100 Subject: 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". --- libavcodec/rv30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/rv30.c') diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c index 4828e982b7..1bb223cd7b 100644 --- a/libavcodec/rv30.c +++ b/libavcodec/rv30.c @@ -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; } -- cgit v1.2.3