diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-14 18:58:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-14 18:58:49 +0200 |
commit | 70f0ffa1ed456fd0b560d0dd1d0d93f1ba3a6d93 (patch) | |
tree | f26a6e4bbc5a82b0b65407e38ec6d2ce0b90b5ac /libavcodec/bmv.c | |
parent | 068c8ce19c688a95c232e4ae27d3e4db4354320d (diff) | |
download | ffmpeg-70f0ffa1ed456fd0b560d0dd1d0d93f1ba3a6d93.tar.gz |
bmv_videodec: fix out of array read
Fixes Ticket1373
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/bmv.c')
-rw-r--r-- | libavcodec/bmv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/bmv.c b/libavcodec/bmv.c index b2d42cc5d2..5d33b910c9 100644 --- a/libavcodec/bmv.c +++ b/libavcodec/bmv.c @@ -272,6 +272,11 @@ static av_cold int decode_init(AVCodecContext *avctx) c->avctx = avctx; avctx->pix_fmt = PIX_FMT_PAL8; + if (avctx->width != SCREEN_WIDE || avctx->height != SCREEN_HIGH) { + av_log(avctx, AV_LOG_ERROR, "Invalid dimension %dx%d\n", avctx->width, avctx->height); + return AVERROR_INVALIDDATA; + } + c->pic.reference = 1; if (avctx->get_buffer(avctx, &c->pic) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |