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: <idho2gjzyy6inx7epop2abk3slmefze4b23k2rog2jdoqq4xvf@pso2tgumee6j>
Date: Fri, 18 Apr 2025 18:34:04 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Kees Cook <kees@...nel.org>
Cc: Erick Archer <erick.archer@...look.com>, 
	Christophe JAILLET <christophe.jaillet@...adoo.fr>, linux-input@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-hardening@...r.kernel.org
Subject: Re: [PATCH] input/joystick: magellan: Mark __nonstring look-up table

On Wed, Apr 16, 2025 at 10:45:17AM -0700, Kees Cook wrote:
> GCC 15's new -Wunterminated-string-initialization notices that the
> 16 character lookup table "nibbles" (which is not used as a C-String)
> needs to be marked as "nonstring":
> 
> drivers/input/joystick/magellan.c: In function 'magellan_crunch_nibbles':
> drivers/input/joystick/magellan.c:51:44: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (17 chars into 16 available) [-Wunterminated-string-initialization]
>    51 |         static unsigned char nibbles[16] = "0AB3D56GH9:K<MN?";
>       |                                            ^~~~~~~~~~~~~~~~~~
> 
> Add the annotation and While at it, mark the table as const too.
> 
> Signed-off-by: Kees Cook <kees@...nel.org>

Applied, thank you.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ