# HG changeset patch # User kostya # Date 1197006747 0 # Node ID 625b4a680d41bbc59cfa309573c1b5ef12e61c15 # Parent 5dfff8f6f5247e018c3e9f660832bc500d421985 Check decoded dimensions for validity diff -r 5dfff8f6f524 -r 625b4a680d41 rv40.c --- a/rv40.c Fri Dec 07 05:50:23 2007 +0000 +++ b/rv40.c Fri Dec 07 05:52:27 2007 +0000 @@ -119,6 +119,8 @@ 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);