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 83CAF47DA0 for ; Fri, 26 Jan 2024 09:13:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 13F3268CE0F; Fri, 26 Jan 2024 11:13:33 +0200 (EET) Received: from sender11-op-o12.zoho.eu (sender11-op-o12.zoho.eu [31.186.226.226]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C51B268C2FE for ; Fri, 26 Jan 2024 11:13:26 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; t=1706260403; cv=none; d=zohomail.eu; s=zohoarc; b=az10P44vQwuoFlVg0qa/oSLVyNNNrkcdhwULMc33SmUR/B76Fmy3sTrcKKD6+/cyvfqdX5rdI33xZq5WEOQfLs4KdWL8u35KGNxSqXfBAEuhBHMUj0ULQFyE5UCva2h4qUSdeiEF9T5p6y72bl76sEpl0so7YWE44WMqa5/4qvQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1706260403; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=0rRPa5h07HHZ2Zv9QpmfQ45khsRA+OD1t6YW39dDKjk=; b=asILeaFHlfn8yqojzU20VjHYWMolN2qalGxV/PrswqCyat5+R5vnnewt3nBih8C0jL/uCtnr8yZGVUNGfJLKeeSYsuwH2WlrmtMKxOk/2uHYSVO6H1tIqHjFZIuOMbeQDGHeCtsaPJRUS4H2FjzODj4huisiz01A5XeINq6GrMs= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=frankplowman.com; spf=pass smtp.mailfrom=post@frankplowman.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1706260403; s=zmail; d=frankplowman.com; i=post@frankplowman.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=0rRPa5h07HHZ2Zv9QpmfQ45khsRA+OD1t6YW39dDKjk=; b=Ggo1ByQgswSNVEWRrOcLNPKi665YRcOpQ26r8Rdro25axbN+yHDFH3JL3bN81ieO rcz2rF3e8GbzJlsOE/83xaGMRjdg/KSjop4zNKUg7QGVIhJqcrO6WkcDJe1QpxDMKuc k/e8YDgsX7+GQnVgfCcHubVvvhb4XtxXidWe5YGI= Received: from localhost.localdomain (frankplowman.com [51.89.148.29]) by mx.zoho.eu with SMTPS id 1706260403047696.483128686835; Fri, 26 Jan 2024 10:13:23 +0100 (CET) From: post@frankplowman.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Jan 2024 09:13:13 +0000 Message-ID: <20240126091313.85991-1-post@frankplowman.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-ZohoMailClient: External Subject: [FFmpeg-devel] [PATCH] lavc/vvc: Clamp shift RHS 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 Cc: Frank Plowman 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: From: Frank Plowman Resolves the following undefined behavior sanitiser error: runtime error: shift exponent 32 is too large for 32-bit type 'int' Signed-off-by: Frank Plowman --- libavcodec/vvc/vvc_intra_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vvc/vvc_intra_template.c b/libavcodec/vvc/vvc_intra_template.c index 9fb47549d5..a078885266 100644 --- a/libavcodec/vvc/vvc_intra_template.c +++ b/libavcodec/vvc/vvc_intra_template.c @@ -969,7 +969,7 @@ static void FUNC(pred_angular_h)(uint8_t *_src, const uint8_t *_top, const uint8 int pos = (1 + ref_idx) * intra_pred_angle; int wt; if (need_pdpc) - wt = (32 >> ((y * 2) >> nscale)); + wt = (32 >> FFMIN(31, (y * 2) >> nscale)); for (int x = 0; x < w; x++) { const int idx = (pos >> 5) + ref_idx; -- 2.43.0 _______________________________________________ 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".