u-boot/drivers/fastboot
Matthias Schiffer 615828721a Revert "lib: string: Fix strlcpy return value", fix callers
Both the Linux kernel and libbsd agree that strlcpy() should always
return strlen(src) and not include the NUL termination. The incorrect
U-Boot implementation makes it impossible to check the return value for
truncation, and breaks code written with the usual implementation in
mind (for example, fdtdec_add_reserved_memory() was subtly broken).

I reviewed all callers of strlcpy() and strlcat() and fixed them
according to my understanding of the intended function.

This reverts commit d3358ecc54 and adds
related fixes.

Fixes: d3358ecc54 ("lib: string: Fix strlcpy return value")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2023-08-08 17:05:43 -04:00
..
fb_command.c Correct SPL uses of FASTBOOT_FLASH_NAND 2023-02-10 07:41:41 -05:00
fb_common.c fastboot: Only call the bootm command if it is enabled 2023-05-31 17:23:01 -04:00
fb_getvar.c Revert "lib: string: Fix strlcpy return value", fix callers 2023-08-08 17:05:43 -04:00
fb_mmc.c lib: sparse: allocate FASTBOOT_MAX_BLK_WRITE instead of small number 2023-07-25 12:44:46 -04:00
fb_nand.c Audit <flash.h> inclusion 2022-08-04 16:18:47 -04:00
Kconfig net: add fastboot TCP support 2023-05-05 17:48:44 -04:00
Makefile Revert "fastboot: Add default fastboot_set_reboot_flag implementation" 2021-02-07 19:22:54 +01:00