diff options
author | James Almer <jamrial@gmail.com> | 2017-11-11 00:36:22 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-11-11 00:36:22 -0300 |
commit | 36e0093dd91fa75ded475f2430852a6b0e86b59a (patch) | |
tree | 8c2dfe9b07f1af943567cbe1019a59a5327a94cd /libavcodec/hevc_ps.c | |
parent | 95a52ca884ce7d7e0a0653c558bd56039ffdc8c4 (diff) | |
parent | 1329c08ad6d2ddb304858f2972c67b508e8b0f0e (diff) | |
download | ffmpeg-36e0093dd91fa75ded475f2430852a6b0e86b59a.tar.gz |
Merge commit '1329c08ad6d2ddb304858f2972c67b508e8b0f0e'
* commit '1329c08ad6d2ddb304858f2972c67b508e8b0f0e':
hevc: Validate the number of long term reference pictures
See ea38e5a6b75706477898eb1e6582d667dbb9946c
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r-- | libavcodec/hevc_ps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 72d02c8372..a4f7ed60f7 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -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; } |