aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/xan.c
diff options
context:
space:
mode:
authorMichael Niedermayer2005-01-12 00:16:25 +0000
committerMichael Niedermayer2005-01-12 00:16:25 +0000
commit0ecca7a49f8e254c12a3a1de048d738bfbb614c6 (patch)
tree816c7073739d918ca579171204e6d3caf9977da5 /libavcodec/xan.c
parentf14d4e7e21c48967c1a877fa9c4eb9943d2c30f5 (diff)
various security fixes and precautionary checks
Originally committed as revision 3822 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r--libavcodec/xan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index f98a06bca9..377a71ef2c 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -132,6 +132,9 @@ static int xan_decode_init(AVCodecContext *avctx)
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)