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] [day] [month] [year] [list]
Message-ID: <20240709031439.llqdyaoxldsevuhc@vireshk-i7>
Date: Tue, 9 Jul 2024 08:44:39 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Raphael Gallais-Pou <rgallaispou@...il.com>
Cc: Patrice Chotard <patrice.chotard@...s.st.com>,
	"'Rafael J . Wysocki'" <rafael@...nel.org>,
	linux-arm-kernel@...ts.infradead.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpufreq: sti: fix build warning

On 08-07-24, 19:14, Raphael Gallais-Pou wrote:
> Building this driver yields the following:
> 
> .../drivers/cpufreq/sti-cpufreq.c:215:50: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=]
>   215 |         snprintf(name, MAX_PCODE_NAME_LEN, pcode%d, pcode);
>       |                                                  ^~
> .../drivers/cpufreq/sti-cpufreq.c:215:44: note: directive argument in the range [0, 2147483647]
>   215 |         snprintf(name, MAX_PCODE_NAME_LEN, pcode%d, pcode);
>       |                                            ^~~~~~~~~
> .../drivers/cpufreq/sti-cpufreq.c:215:9: note: ‘snprintf’ output between 7 and 16 bytes into a destination of size 7
>   215 |         snprintf(name, MAX_PCODE_NAME_LEN, pcode%d, pcode);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Fix the buffer size to avoid the warning at build time.
> 
> Signed-off-by: Raphael Gallais-Pou <rgallaispou@...il.com>
> ---
>  drivers/cpufreq/sti-cpufreq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied. Thanks.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ