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 9956749505 for ; Mon, 13 May 2024 01:20:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3EACD68D5F9; Mon, 13 May 2024 04:20:23 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0A2F468D3FA for ; Mon, 13 May 2024 04:20:16 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B6F271BF204 for ; Mon, 13 May 2024 01:20:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1715563216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GJnLiuRvg0WCFSElrEk9WOARhr5M7l3pYBnOpxzEMzw=; b=I9b5lE7vfMY1zkFt2Yt7zzRFcZL3rigCmVMgZTiMcjvicuLIv3Z14INbfrDwlcFSeesjAh reiZqFwqx4skm5Rs9n+CqzT0bqWItsEQ/nt7beA/m4AaB56vuWMYrbrnSafa1FJ3IakktR R4DcF18tyd9flSNmuiotjFMBik8Ivr/+91agIyvcjBqvRgRgP5wCrHDqUgECMb4TwENQak 2gRUg53XNMsYWDda0Jj020JYkY1AwQk1MU9/Xu5k6zyFb9dLDqP9Yd2+3vwzz2E7Ir1c3g bDYYZghwKaGdKcBjQFjdiJbzFzgeXV4MaVdPVlc7Gu2P/uUOktQUoaJzGuBwEQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 13 May 2024 03:20:10 +0200 Message-ID: <20240513012011.1049366-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240513012011.1049366-1-michael@niedermayer.cc> References: <20240513012011.1049366-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/4] avcodec/proresenc_anatoliy: Assert that AV_PROFILE_UNKNOWN is replaced 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: If its not replaced we would have a negative index used in an array potentially Helps: CID1440385 Negative array index read Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/proresenc_anatoliy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 2fb96e9cf56..8709f400d04 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -857,7 +857,8 @@ static av_cold int prores_encode_init(AVCodecContext *avctx) avctx->profile = AV_PROFILE_PRORES_4444; av_log(avctx, AV_LOG_INFO, "encoding with ProRes 4444+ (ap4h) profile\n"); - } + } else + av_assert0(0); } else if (avctx->profile < AV_PROFILE_PRORES_PROXY || avctx->profile > AV_PROFILE_PRORES_XQ) { av_log( -- 2.43.2 _______________________________________________ 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".