[FFmpeg-devel] [PATCH 2/2] avcodec/ilbcdec: Check startindex

Michael Niedermayer michael at niedermayer.cc
Sun Oct 21 01:35:12 EEST 2018


Fixes: Out of array read
Fixes: 10789/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5153255445757952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/ilbcdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ilbcdec.c b/libavcodec/ilbcdec.c
index 8f234b98e1..8a6dbe0b75 100644
--- a/libavcodec/ilbcdec.c
+++ b/libavcodec/ilbcdec.c
@@ -1372,7 +1372,7 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data,
 
     if (unpack_frame(s))
         mode = 0;
-    if (s->frame.start < 1)
+    if (s->frame.start < 1 || s->frame.start > 5)
         mode = 0;
 
     if (mode) {
-- 
2.19.1



More information about the ffmpeg-devel mailing list