[FFmpeg-cvslog] avcodec/scpr: Fix multiple runtime error: index 256 out of bounds for type 'unsigned int [256]'
Michael Niedermayer
git at videolan.org
Sat May 13 16:55:31 EEST 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat May 13 15:39:32 2017 +0200| [2171dfae8c065878a2e130390eb78cf2947a5b69] | committer: Michael Niedermayer
avcodec/scpr: Fix multiple runtime error: index 256 out of bounds for type 'unsigned int [256]'
Fixes: 1519/clusterfuzz-testcase-minimized-5286680976162816
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=2171dfae8c065878a2e130390eb78cf2947a5b69
---
libavcodec/scpr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index b87c047ab6..46f072c757 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -261,6 +261,9 @@ static int decode_unit(SCPRContext *s, PixelModel *pixel, unsigned step, unsigne
break;
c++;
}
+ if (x >= 16 || c >= 256) {
+ return AVERROR_INVALIDDATA;
+ }
if ((ret = s->decode(gb, rc, cumfr, cnt_c, totfr)) < 0)
return ret;
More information about the ffmpeg-cvslog
mailing list