Commit b195aa5d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/hevc_ps: Check vps_num_hrd_parameters

Fix CID1239052 part2
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 16c95b10
...@@ -480,6 +480,11 @@ int ff_hevc_decode_nal_vps(HEVCContext *s) ...@@ -480,6 +480,11 @@ int ff_hevc_decode_nal_vps(HEVCContext *s)
if (vps->vps_poc_proportional_to_timing_flag) if (vps->vps_poc_proportional_to_timing_flag)
vps->vps_num_ticks_poc_diff_one = get_ue_golomb_long(gb) + 1; vps->vps_num_ticks_poc_diff_one = get_ue_golomb_long(gb) + 1;
vps->vps_num_hrd_parameters = get_ue_golomb_long(gb); vps->vps_num_hrd_parameters = get_ue_golomb_long(gb);
if (vps->vps_num_hrd_parameters > (unsigned)vps->vps_num_layer_sets) {
av_log(s->avctx, AV_LOG_ERROR,
"vps_num_hrd_parameters %d is invalid\n", vps->vps_num_hrd_parameters);
goto err;
}
for (i = 0; i < vps->vps_num_hrd_parameters; i++) { for (i = 0; i < vps->vps_num_hrd_parameters; i++) {
int common_inf_present = 1; int common_inf_present = 1;
......
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