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:
parent
02ae52db87
commit
22a878ecd1
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user