[FFmpeg-cvslog] avcodec/hcadec: Check scale_factors

Michael Niedermayer git at videolan.org
Tue Mar 31 21:30:30 EEST 2020


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Mar 28 22:04:06 2020 +0100| [67de1865b1ee9e3616124b8fb6f1c34cba1b1d5f] | committer: Michael Niedermayer

avcodec/hcadec: Check scale_factors

Fixes: out of array read
Fixes: 21286/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5683183715876864

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

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

 libavcodec/hcadec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/hcadec.c b/libavcodec/hcadec.c
index 4e3f589579..f25d6c39b6 100644
--- a/libavcodec/hcadec.c
+++ b/libavcodec/hcadec.c
@@ -345,6 +345,7 @@ static void unpack(HCAContext *c, ChannelContext *ch,
             } else {
                 factor += delta - half_max;
             }
+            factor = av_clip_uintp2(factor, 6);
 
             ch->scale_factors[i] = factor;
         }



More information about the ffmpeg-cvslog mailing list