mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-05-01 06:13:08 +08:00
avcodec/scpr: check for possible out of array access
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user