Module: libav
Branch: release/0.8
Commit: 6bb536401c37ac92a6920c0669cb7e8ab0766959

Author:    Michael Niedermayer <mich...@niedermayer.cc>
Committer: Diego Biurrun <di...@biurrun.de>
Date:      Tue Feb  7 15:49:09 2017 +0100

pictor: Correctly check frame dimensions

Fixes: 559/clusterfuzz-testcase-6424225917173760
Bug-Id: CVE-2017-7862

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
(cherry picked from commit 8c2ea3030af7b40a3c4275696fb5c76cdb80950a)
Signed-off-by: Diego Biurrun <di...@biurrun.de>

---

 libavcodec/pictordec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index 6f2193d..5203041 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -138,7 +138,7 @@ static int decode_frame(AVCodecContext *avctx,
 
     avctx->pix_fmt = PIX_FMT_PAL8;
 
-    if (s->width != avctx->width && s->height != avctx->height) {
+    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);

_______________________________________________
libav-commits mailing list
libav-commits@libav.org
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to