diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-01-12 03:16:25 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-12 03:16:25 +0300 |
commit | 0ecca7a49f8e254c12a3a1de048d738bfbb614c6 (patch) | |
tree | 816c7073739d918ca579171204e6d3caf9977da5 /libavcodec/vqavideo.c | |
parent | f14d4e7e21c48967c1a877fa9c4eb9943d2c30f5 (diff) |
various security fixes and precautionary checks
Originally committed as revision 3822 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vqavideo.c')
-rw-r--r-- | libavcodec/vqavideo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c index ea86fb1086..fb0871e182 100644 --- a/libavcodec/vqavideo.c +++ b/libavcodec/vqavideo.c @@ -151,6 +151,10 @@ static int vqa_decode_init(AVCodecContext *avctx) 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]; |