1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/scpr: check for possible out of array access

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2018-04-02 08:59:20 +02:00
parent 02ae52db87
commit 22a878ecd1

View File

@ -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;