PNP: Expand length of fixup id string
Subsystems (2)
PATCH 1/1 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.
Cc "Rafael J. Wysocki" <[email protected]>
Signed-off-by Kees Cook <[email protected]>
--- include/linux/pnp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/pnp.h +1 -1
@@ -290,7 +290,7 @@ static inline void pnp_set_drvdata(struct pnp_dev *pdev, void *data) }struct pnp_fixup { -char id[7 ]; +char id[8 ];void (*quirk_function) (struct pnp_dev *dev);/* fixup function */ };
Signature · 1 line
2.34.1
Quoted 19 lines · Kees Cook
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.
Cc "Rafael J. Wysocki" <[email protected]>Signed-off-by Kees Cook <[email protected]>--- include/linux/pnp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/pnp.h +0
-0
include/linux/pnp.h static inline void pnp_set_drvdata(struct pnp_dev *pdev, void *data)
Quoted 9 lines
include/linux/pnp.h +1
-2@@ -290,7 +290,7 @@ static inline void pnp_set_drvdata(struct pnp_dev *pdev, void *data) }struct pnp_fixup { -char id[7 ]; +char id[8 ];void (*quirk_function) (struct pnp_dev *dev);/* fixup function */ }; --
Applied as 6.15 material, thanks!