From b192e56461cfd83c5d3b7929b82b67395edbaa8e Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 7 Dec 2007 05:52:27 +0000 Subject: [PATCH] Check decoded dimensions for validity Originally committed as revision 11184 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/rv40.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 642386c380..1a7451e1b9 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -119,6 +119,8 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn t = get_bits(gb, 13); /// ??? if(!si->type || !get_bits1(gb)) rv40_parse_picture_size(gb, &w, &h); + if(avcodec_check_dimensions(r->s.avctx, w, h) < 0) + return -1; si->width = w; si->height = h; mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);