Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-19 14:56:08 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-12-19 15:04:03 +0300
commitf346e37aa27475b4d2153f3606c7d47847854de3 (patch)
tree3e9348f06b2c2723c0099567dcc73c8a4ad75a5d /libavcodec/jvdec.c
parent6c68522a2aa8c3fc664482ab8a18c991039c78aa (diff)
parent88626e5af8d006e67189bf10b96b982502a7e8ad (diff)
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.c7
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);