Re: [PATCH] [v2] gpio: virtuser: avoid non-constant format string

From: Bartosz Golaszewski
Date: Fri Jul 19 2024 - 10:58:31 EST


From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>


On Fri, 19 Jul 2024 16:44:10 +0200, Arnd Bergmann wrote:
> Using a string variable as an sprintf format is potentially
> dangerous, and gcc can warn about this:
>
> drivers/gpio/gpio-virtuser.c: In function 'gpio_virtuser_dbgfs_init_line_attrs':
> drivers/gpio/gpio-virtuser.c:808:9: error: format not a string literal and no format arguments [-Werror=format-security]
> 808 | sprintf(data->consumer, id);
> | ^~~~~~~
>
> [...]

Applied, thanks!

[1/1] gpio: virtuser: avoid non-constant format string
commit: 3ae08e47742eeebf2190900d31ddac53fdd13a5b

Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>