[FFmpeg-cvslog] avcodec/cdxl: Check format for BGR24

Michael Niedermayer git at videolan.org
Mon May 8 13:35:04 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon May  8 11:46:03 2017 +0200| [1e42736b95065c69a7481d0cf55247024f54b660] | committer: Michael Niedermayer

avcodec/cdxl: Check format for BGR24

Fixes: out of array access
Fixes: 1427/clusterfuzz-testcase-minimized-5020737339392000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e42736b95065c69a7481d0cf55247024f54b660
---

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

diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c
index 5c0ecb279c..78f5d50102 100644
--- a/libavcodec/cdxl.c
+++ b/libavcodec/cdxl.c
@@ -279,7 +279,7 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
         return AVERROR_INVALIDDATA;
     if (!encoding && c->palette_size && c->bpp <= 8 && c->format != CHUNKY) {
         avctx->pix_fmt = AV_PIX_FMT_PAL8;
-    } else if (encoding == 1 && (c->bpp == 6 || c->bpp == 8)) {
+    } else if (encoding == 1 && (c->bpp == 6 || c->bpp == 8) && c->format != CHUNKY) {
         if (c->palette_size != (1 << (c->bpp - 1)))
             return AVERROR_INVALIDDATA;
         avctx->pix_fmt = AV_PIX_FMT_BGR24;



More information about the ffmpeg-cvslog mailing list