From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 163D740BCF for ; Sat, 6 Aug 2022 10:06:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7E1E568B6AB; Sat, 6 Aug 2022 13:06:50 +0300 (EEST) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2FBE568AD06 for ; Sat, 6 Aug 2022 13:06:44 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id AA9532ECEBA for ; Sat, 6 Aug 2022 12:06:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1659780403; bh=EiXcrNYG7mlTinC2LBs/DYys0ZNPw0Najq2PYokT2PA=; h=Date:Subject:To:References:From:In-Reply-To; b=bcK2pqZPo+0agDpTOOGGMVEhgVki7uYfPJKc//O/ghJLzf6j7N7XnisC2rYpW0Owi tNNI23iW6ByT7YUlpoQtlDamhZMFeysBUUh61t47Oqu7sQCCAI7UXLYCUfOXooJLLJ gWTl922u3ZfQBMXnbK7iwG3b+QhCELFRg64Eew3Z5nKjmGhTtzDpcW+FudxrbMkYVL A/aP2k1nVfjpA+o3xB0ho/IyC8KlcMjlDZHwa7Nk1abHZoTh3Bv2DYt5+Y4SbscOX+ t7qF4C6OCaM56Be73Q0rGs7+uMEyfM+rHhfncphFDb2aO5GDpOe8caHdng2MlwEu2T hfDXk712FIOxg== Message-ID: <72e8969c-1eba-7e74-d91c-3f72215d5448@rothenpieler.org> Date: Sat, 6 Aug 2022 12:06:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.0 To: ffmpeg-devel@ffmpeg.org References: Content-Language: en-US From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avcodec/nvdec_hevc: Fix off-by-one error X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 06.08.2022 08:01, Andreas Rheinhardt wrote: > Fixes Coverity issues #1442912, #1442913, #1442916 and #1442917. > > Signed-off-by: Andreas Rheinhardt > --- > Given that hevc_ps.c checks these values, it is actually impossible > for this error to be triggered. > > libavcodec/nvdec_hevc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/nvdec_hevc.c b/libavcodec/nvdec_hevc.c > index 590278ba04..cd549d2ef6 100644 > --- a/libavcodec/nvdec_hevc.c > +++ b/libavcodec/nvdec_hevc.c > @@ -204,8 +204,8 @@ static int nvdec_hevc_start_frame(AVCodecContext *avctx, > ppc->row_height_minus1[i] = pps->row_height[i] - 1; > > #if NVDECAPI_CHECK_VERSION(9, 0) > - if (pps->chroma_qp_offset_list_len_minus1 > FF_ARRAY_ELEMS(ppc->cb_qp_offset_list) || > - pps->chroma_qp_offset_list_len_minus1 > FF_ARRAY_ELEMS(ppc->cr_qp_offset_list)) { > + if (pps->chroma_qp_offset_list_len_minus1 >= FF_ARRAY_ELEMS(ppc->cb_qp_offset_list) || > + pps->chroma_qp_offset_list_len_minus1 >= FF_ARRAY_ELEMS(ppc->cr_qp_offset_list)) { > av_log(avctx, AV_LOG_ERROR, "Too many chroma_qp_offsets\n"); > return AVERROR(ENOSYS); > } LGTM _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".