diff vqavideo.c @ 2422:18b8b2dcc037 libavcodec

various security fixes and precautionary checks
author michael
date Wed, 12 Jan 2005 00:16:25 +0000
parents 39ad6cd5d4a6
children ef2149182f1c
line wrap: on
line diff
--- a/vqavideo.c	Tue Jan 11 08:16:04 2005 +0000
+++ b/vqavideo.c	Wed Jan 12 00:16:25 2005 +0000
@@ -151,6 +151,10 @@
     s->vqa_version = vqa_header[0];
     s->width = LE_16(&vqa_header[6]);
     s->height = LE_16(&vqa_header[8]);
+    if(avcodec_check_dimensions(avctx, s->width, s->height)){
+        s->width= s->height= 0;
+        return -1;
+    }
     s->vector_width = vqa_header[10];
     s->vector_height = vqa_header[11];
     s->partial_count = s->partial_countdown = vqa_header[13];