diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-13 15:39:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-13 15:54:33 +0200 |
commit | 2171dfae8c065878a2e130390eb78cf2947a5b69 (patch) | |
tree | ed29f59322568fc483c7e21f9df7ac4903590fb4 | |
parent | 54e1b62ee28f1588ca35d26eeb2df1fb59040de3 (diff) | |
download | ffmpeg-2171dfae8c065878a2e130390eb78cf2947a5b69.tar.gz |
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@niedermayer.cc>
-rw-r--r-- | libavcodec/scpr.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |