diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-19 12:56:08 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-19 13:04:03 +0100 |
commit | f346e37aa27475b4d2153f3606c7d47847854de3 (patch) | |
tree | 3e9348f06b2c2723c0099567dcc73c8a4ad75a5d /libavcodec/jvdec.c | |
parent | 6c68522a2aa8c3fc664482ab8a18c991039c78aa (diff) | |
parent | 88626e5af8d006e67189bf10b96b982502a7e8ad (diff) | |
download | ffmpeg-f346e37aa27475b4d2153f3606c7d47847854de3.tar.gz |
Merge commit '88626e5af8d006e67189bf10b96b982502a7e8ad'
* commit '88626e5af8d006e67189bf10b96b982502a7e8ad':
jvdec: check frame dimensions
See: 105654e376a736d243aef4a1d121abebce912e6b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/jvdec.c')
-rw-r--r-- | libavcodec/jvdec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index 47e8edcae6..9c4a8d4ca3 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -43,6 +43,13 @@ 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); + } + s->frame = av_frame_alloc(); if (!s->frame) return AVERROR(ENOMEM); |