[FFmpeg-cvslog] avcodec/siren: Check index for catergory5

Michael Niedermayer git at videolan.org
Sun Sep 19 21:15:58 EEST 2021


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Sep 17 21:51:06 2021 +0200| [db18f29b33a060b3ce0fc7ac7d215aeb3506c0ae] | committer: Michael Niedermayer

avcodec/siren: Check index for catergory5

Fixes: out of array access
Fixes: 38603/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSNSIREN_fuzzer-5741847809490944.fuzz

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

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

 libavcodec/siren.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/siren.c b/libavcodec/siren.c
index 2161b29a2c..7f2b467860 100644
--- a/libavcodec/siren.c
+++ b/libavcodec/siren.c
@@ -648,6 +648,10 @@ static int decode_vector(SirenContext *s, int number_of_regions,
                 }
                 coefs_ptr++;
             }
+            if (i >= FF_ARRAY_ELEMS(noise_category5)) {
+                error = 1;
+                break;
+            }
 
             noise = decoder_standard_deviation[region] * noise_category5[i];
         } else



More information about the ffmpeg-cvslog mailing list