diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-15 02:28:28 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-15 04:09:40 +0300 |
commit | bc406744620710911de9157eafa3e61d0246566f (patch) | |
tree | 9580830f3729b42f3e833727087315eeb43e7a0c /libavcodec/hevcdec.c | |
parent | 1cb4ef526dd1e5f547d0354efb0831d07e967919 (diff) |
avcodec/hevcdec: Check nb_sps
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/hevcdec.c')
-rw-r--r-- | libavcodec/hevcdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 23a89345a8..32703f090a 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -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; |