1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-19 01:20:07 +01:00
Files
u-boot-megous/drivers
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
..
2023-07-13 11:29:40 +02:00
2023-05-21 16:54:41 +02:00
2023-02-10 07:41:39 -05:00
2021-10-05 08:50:15 -04:00
2023-05-02 14:23:58 -04:00
2023-07-21 09:00:39 +02:00
2022-01-13 07:57:49 -05:00
2023-03-02 17:45:58 -05:00
2023-01-20 12:27:24 -05:00
2023-04-21 15:16:01 +08:00
2023-08-03 09:40:49 -04:00
2023-04-25 15:31:28 -04:00