lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230824073710.2677348-15-lee@kernel.org>
Date:   Thu, 24 Aug 2023 08:36:59 +0100
From:   Lee Jones <lee@...nel.org>
To:     lee@...nel.org
Cc:     linux-kernel@...r.kernel.org,
        Philipp Zabel <p.zabel@...gutronix.de>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        dri-devel@...ts.freedesktop.org,
        linux-arm-kernel@...ts.infradead.org
Subject: [PATCH 14/20] drm/imx/ipuv3/imx-ldb: Increase buffer size to ensure all possible values can be stored

When converting from int to string, we must allow for up to 10-chars (2147483647).

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/imx/ipuv3/imx-ldb.c: In function ‘imx_ldb_probe’:
 drivers/gpu/drm/imx/ipuv3/imx-ldb.c:659:39: warning: ‘_sel’ directive writing 4 bytes into a region of size between 3 and 13 [-Wformat-overflow=]
 drivers/gpu/drm/imx/ipuv3/imx-ldb.c:659:17: note: ‘sprintf’ output between 8 and 18 bytes into a destination of size 16

Signed-off-by: Lee Jones <lee@...nel.org>
---
Cc: Philipp Zabel <p.zabel@...gutronix.de>
Cc: David Airlie <airlied@...il.com>
Cc: Daniel Vetter <daniel@...ll.ch>
Cc: Shawn Guo <shawnguo@...nel.org>
Cc: Sascha Hauer <s.hauer@...gutronix.de>
Cc: Pengutronix Kernel Team <kernel@...gutronix.de>
Cc: Fabio Estevam <festevam@...il.com>
Cc: NXP Linux Team <linux-imx@....com>
Cc: dri-devel@...ts.freedesktop.org
Cc: linux-arm-kernel@...ts.infradead.org
---
 drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c
index c45fc8f4744d0..0404781dcd176 100644
--- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c
+++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c
@@ -654,7 +654,7 @@ static int imx_ldb_probe(struct platform_device *pdev)
 	 * Map them all to di0_sel...di3_sel.
 	 */
 	for (i = 0; i < 4; i++) {
-		char clkname[16];
+		char clkname[18];
 
 		sprintf(clkname, "di%d_sel", i);
 		imx_ldb->clk_sel[i] = devm_clk_get(imx_ldb->dev, clkname);
-- 
2.42.0.rc1.204.g551eb34607-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ