From ffe4ec5c84f5e7f9cf358eb206f626ec5d437449 Mon Sep 17 00:00:00 2001 From: James Almer Date: Fri, 23 Jun 2023 09:39:14 -0300 Subject: [PATCH] avcodec/evc_ps: fix allowed range for pps_pic_parameter_set_id Signed-off-by: James Almer --- libavcodec/evc_ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/evc_ps.c b/libavcodec/evc_ps.c index cd699d6ad5..ec405345ae 100644 --- a/libavcodec/evc_ps.c +++ b/libavcodec/evc_ps.c @@ -315,7 +315,7 @@ int ff_evc_parse_pps(GetBitContext *gb, EVCParamSets *ps) int ret; pps_pic_parameter_set_id = get_ue_golomb(gb); - if (pps_pic_parameter_set_id > EVC_MAX_PPS_COUNT) + if (pps_pic_parameter_set_id >= EVC_MAX_PPS_COUNT) return AVERROR_INVALIDDATA; pps = av_malloc(sizeof(*pps));