diff rv40.c @ 5994:625b4a680d41 libavcodec

Check decoded dimensions for validity
author kostya
date Fri, 07 Dec 2007 05:52:27 +0000
parents 5dfff8f6f524
children a33699306850
line wrap: on
line diff
--- 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);