Commit bc406744 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/hevcdec: Check nb_sps

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1cb4ef52
......@@ -248,6 +248,8 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb)
nb_sps = get_ue_golomb_long(gb);
nb_sh = get_ue_golomb_long(gb);
if (nb_sps > sps->num_long_term_ref_pics_sps)
return AVERROR_INVALIDDATA;
if (nb_sh + (uint64_t)nb_sps > FF_ARRAY_ELEMS(rps->poc))
return AVERROR_INVALIDDATA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment