linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Remove all strcpy() uses
@ 2021-07-24 15:14 Len Baker
  2021-07-24 15:14 ` [PATCH v2 1/3] staging/fbtft: " Len Baker
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Len Baker @ 2021-07-24 15:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Len Baker, Andy Shevchenko, Phil Reid, Geert Uytterhoeven,
	dri-devel, linux-fbdev, linux-staging, linux-kernel

strcpy() performs no bounds checking on the destination buffer. This
could result in linear overflows beyond the end of the buffer, leading
to all kinds of misbehaviors. So, this serie removes all strcpy uses
from the "staging/fbtft" subsystem.

Also, refactor the code a bit to follow the kernel coding-style and
avoid unnecessary variable initialization.

Changelog v1 -> v2
- Add two new commits to clean the code.
- Use the "%*ph" format specifier instead of strscpy() function (Geert
  Uytterhoeven)

Len Baker (3):
  staging/fbtft: Remove all strcpy() uses
  staging/fbtft: Remove unnecessary variable initialization
  staging/fbtft: Fix braces coding style

 drivers/staging/fbtft/fbtft-core.c | 30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)

--
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-31 13:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-24 15:14 [PATCH v2 0/3] Remove all strcpy() uses Len Baker
2021-07-24 15:14 ` [PATCH v2 1/3] staging/fbtft: " Len Baker
2021-07-24 20:21   ` Andy Shevchenko
2021-07-25 13:58     ` Len Baker
2021-07-25 18:51       ` Andy Shevchenko
2021-07-31 13:43         ` Len Baker
2021-07-24 15:14 ` [PATCH v2 2/3] staging/fbtft: Remove unnecessary variable initialization Len Baker
2021-07-24 15:14 ` [PATCH v2 3/3] staging/fbtft: Fix braces coding style Len Baker
2021-07-24 18:01   ` Geert Uytterhoeven
2021-07-25 14:02     ` Len Baker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).