[FFmpeg-cvslog] avcodec/magicyuv: correct end of array check in multi VLC parsing

Michael Niedermayer git at videolan.org
Fri Oct 27 19:19:36 EEST 2023


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Oct 22 17:06:57 2023 +0200| [4ddf4f5001ca6fd3525e4acb62c19627fdb76f8e] | committer: Michael Niedermayer

avcodec/magicyuv: correct end of array check in multi VLC parsing

Fixes: out of array write
Fixes: 63390/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MAGICYUV_fuzzer-5144552979431424.fuzz

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

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

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

diff --git a/libavcodec/magicyuv.c b/libavcodec/magicyuv.c
index 3573db0f0a..d813f20920 100644
--- a/libavcodec/magicyuv.c
+++ b/libavcodec/magicyuv.c
@@ -299,7 +299,7 @@ static int magy_decode_slice(AVCodecContext *avctx, void *tdata,
                 return ret;
 
             for (k = 0; k < height; k++)
-                READ_PLANE(dst, i, 1, 5)
+                READ_PLANE(dst, i, 1, 7)
         }
 
         switch (pred) {



More information about the ffmpeg-cvslog mailing list