diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-21 04:28:12 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-21 04:28:28 +0100 |
commit | 6e5dd43bf9099a72de04ccc8a65dd1c4939aed92 (patch) | |
tree | b8961ce54e8766571d5301a32f4a31dff7919b08 /libavcodec | |
parent | 5e16809d493c773573d081de17ec78fddd3ca043 (diff) | |
parent | 50cb695bf124b0bd4d9e2b3c1bfdd08b35b14438 (diff) | |
download | ffmpeg-6e5dd43bf9099a72de04ccc8a65dd1c4939aed92.tar.gz |
Merge commit '50cb695bf124b0bd4d9e2b3c1bfdd08b35b14438' into release/1.1
* commit '50cb695bf124b0bd4d9e2b3c1bfdd08b35b14438':
jvdec: check frame dimensions
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/jvdec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index 53d8285788..128d69e1d4 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -40,6 +40,14 @@ typedef struct JvContext { static av_cold int decode_init(AVCodecContext *avctx) { JvContext *s = avctx->priv_data; + + if (!avctx->width || !avctx->height || + (avctx->width & 7) || (avctx->height & 7)) { + av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n", + avctx->width, avctx->height); + return AVERROR(EINVAL); + } + avctx->pix_fmt = AV_PIX_FMT_PAL8; ff_dsputil_init(&s->dsp, avctx); return 0; |