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
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue