diff xan.c @ 2422:18b8b2dcc037 libavcodec

various security fixes and precautionary checks
author michael
date Wed, 12 Jan 2005 00:16:25 +0000
parents 39ad6cd5d4a6
children ad9d121cc6e9
line wrap: on
line diff
--- a/xan.c	Tue Jan 11 08:16:04 2005 +0000
+++ b/xan.c	Wed Jan 12 00:16:25 2005 +0000
@@ -132,6 +132,9 @@
         v_b_table[i] = V_B * i;
     }
 
+    if(avcodec_check_dimensions(avctx, avctx->width, avctx->height))
+        return -1;
+    
     s->buffer1 = av_malloc(avctx->width * avctx->height);
     s->buffer2 = av_malloc(avctx->width * avctx->height);
     if (!s->buffer1 || !s->buffer2)