avcodec/scpr: check for possible out of array access

Signed-off-by: Paul B Mahol <onemda@gmail.com>
pull/283/head
Paul B Mahol 7 years ago
parent 02ae52db87
commit 22a878ecd1
  1. 4
      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;

Loading…
Cancel
Save