mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/hevc_sei: Check num_sps_ids_minus1 value
Fixes CID1271794 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8a62b80ce6
commit
93b0ee21a2
|
@ -126,6 +126,11 @@ static int active_parameter_sets(HEVCContext *s)
|
|||
get_bits(gb, 1); // num_sps_ids_minus1
|
||||
num_sps_ids_minus1 = get_ue_golomb_long(gb); // num_sps_ids_minus1
|
||||
|
||||
if (num_sps_ids_minus1 < 0 || num_sps_ids_minus1 > 15) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "num_sps_ids_minus1 %d invalid\n", num_sps_ids_minus1);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
active_seq_parameter_set_id = get_ue_golomb_long(gb);
|
||||
if (active_seq_parameter_set_id >= MAX_SPS_COUNT) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "active_parameter_set_id %d invalid\n", active_seq_parameter_set_id);
|
||||
|
|
Loading…
Reference in New Issue