diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-03 21:45:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-04 01:02:06 +0200 |
commit | 8088d6f5f11b9f9188555f4642c940ddc92271a6 (patch) | |
tree | 265b235bfeaacd15698cc2fc5daac6597c821e27 | |
parent | d21e496cf5ae90429e28cd11e18436ca2ddfb13b (diff) | |
download | ffmpeg-8088d6f5f11b9f9188555f4642c940ddc92271a6.tar.gz |
avcodec/pictordec: run av_image_check_size() unconditionally
This ensures that no invalid size leaks through
(This issue is hypothetical, ive no testcase)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/pictordec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c index df3380ddda..a6ecd99d62 100644 --- a/libavcodec/pictordec.c +++ b/libavcodec/pictordec.c @@ -140,9 +140,9 @@ static int decode_frame(AVCodecContext *avctx, avctx->pix_fmt = AV_PIX_FMT_PAL8; + if (av_image_check_size(s->width, s->height, 0, avctx) < 0) + return -1; if (s->width != avctx->width && s->height != avctx->height) { - if (av_image_check_size(s->width, s->height, 0, avctx) < 0) - return -1; avcodec_set_dimensions(avctx, s->width, s->height); } |