Commit 36e0093d authored by James Almer's avatar James Almer

Merge commit '1329c08a'

* commit '1329c08a':
  hevc: Validate the number of long term reference pictures

See ea38e5a6Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 95a52ca8 1329c08a
......@@ -1075,8 +1075,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
sps->long_term_ref_pics_present_flag = get_bits1(gb);
if (sps->long_term_ref_pics_present_flag) {
sps->num_long_term_ref_pics_sps = get_ue_golomb_long(gb);
if (sps->num_long_term_ref_pics_sps > 31U) {
av_log(avctx, AV_LOG_ERROR, "num_long_term_ref_pics_sps %d is out of range.\n",
if (sps->num_long_term_ref_pics_sps > HEVC_MAX_LONG_TERM_REF_PICS) {
av_log(avctx, AV_LOG_ERROR, "Too many long term ref pics: %d.\n",
sps->num_long_term_ref_pics_sps);
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