Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PNP: Expand length of fixup id string

GCC 15's -Wunterminated-string-initialization saw that "id" was not
including the required trailing NUL character. Instead of marking "id"
with __nonstring[1], expand the length of the string as it is used in
(debugging) format strings that expect a properly formed C string.

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1]
Signed-off-by: Kees Cook <kees@kernel.org>
Link: https://patch.msgid.link/20250310222432.work.826-kees@kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Kees Cook and committed by
Rafael J. Wysocki
425b1c97 270247a2

+1 -1
+1 -1
include/linux/pnp.h
··· 290 290 } 291 291 292 292 struct pnp_fixup { 293 - char id[7]; 293 + char id[8]; 294 294 void (*quirk_function) (struct pnp_dev *dev); /* fixup function */ 295 295 }; 296 296