ffmpeg | branch: master | Paul B Mahol <[email protected]> | Mon Apr 2 08:59:20 2018 +0200| [22a878ecd1c1d67ea985e998d9c0493795b86427] | committer: Paul B Mahol
avcodec/scpr: check for possible out of array access Signed-off-by: Paul B Mahol <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=22a878ecd1c1d67ea985e998d9c0493795b86427 --- libavcodec/scpr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c index ad6073dbf0..3c797d55f5 100644 --- a/libavcodec/scpr.c +++ b/libavcodec/scpr.c @@ -211,6 +211,10 @@ static int decode_value(SCPRContext *s, unsigned *cnt, unsigned maxc, unsigned s break; c++; } + + if (c >= maxc) + return AVERROR_INVALIDDATA; + if ((ret = s->decode(gb, rc, cumfr, cnt_c, totfr)) < 0) return ret; _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
