All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] string: strl(cat|cpy)
@ 2021-03-11  5:15 Sean Anderson
  2021-03-11  5:15 ` [PATCH v2 1/5] lib: string: Fix strlcpy return value Sean Anderson
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Sean Anderson @ 2021-03-11  5:15 UTC (permalink / raw)
  To: u-boot

This series adds support for strl(cat|cpy), and brings their implementations
in-line with what is documented in the Linux man pages. It also fixes some
potential (actual) fastboot bugs. Lastly, it adds a patman check to suggest
using these functions over strn(cat|cpy). I think these functions provide a much
better interface, which removes some footguns from U-Boot.

Changes in v2:
- Fix strlcpy return value
- Add implementation of strlcat
- Add test for strlcat
- Fix bug in fastboot
- Move check to u_boot_line

Sean Anderson (5):
  lib: string: Fix strlcpy return value
  lib: string: Implement strlcat
  test: Add test for strlcat
  fastboot: Fix possible buffer overrun
  checkpatch: Add warnings for using strn(cat|cpy)

 drivers/fastboot/fb_mmc.c       |   6 +-
 drivers/usb/dwc3/linux-compat.h |   6 --
 include/linux/string.h          |   3 +
 lib/string.c                    |  31 +++++++-
 scripts/checkpatch.pl           |   6 ++
 test/lib/Makefile               |   1 +
 test/lib/strlcat.c              | 126 ++++++++++++++++++++++++++++++++
 tools/patman/test_checkpatch.py |  14 +++-
 8 files changed, 179 insertions(+), 14 deletions(-)
 create mode 100644 test/lib/strlcat.c

-- 
2.30.1

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

end of thread, other threads:[~2021-04-13 14:29 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11  5:15 [PATCH v2 0/5] string: strl(cat|cpy) Sean Anderson
2021-03-11  5:15 ` [PATCH v2 1/5] lib: string: Fix strlcpy return value Sean Anderson
2021-03-25  0:38   ` Simon Glass
2021-03-25  0:54     ` Sean Anderson
2021-03-25  2:40       ` Simon Glass
2021-03-25  0:53   ` Sean Anderson
2021-04-13 14:28   ` Tom Rini
2021-03-11  5:15 ` [PATCH v2 2/5] lib: string: Implement strlcat Sean Anderson
2021-03-25  0:38   ` Simon Glass
2021-04-13 14:28   ` Tom Rini
2021-03-11  5:15 ` [PATCH v2 3/5] test: Add test for strlcat Sean Anderson
2021-03-25  0:38   ` Simon Glass
2021-04-13 14:29   ` Tom Rini
2021-03-11  5:15 ` [PATCH v2 4/5] fastboot: Fix possible buffer overrun Sean Anderson
2021-04-13 14:29   ` Tom Rini
2021-03-11  5:15 ` [PATCH v2 5/5] checkpatch: Add warnings for using strn(cat|cpy) Sean Anderson
2021-03-25  0:38   ` Simon Glass
2021-04-13 14:29   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.