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 d3358ecc54be0bc3b4dd11f7a63eab0a2842f772 and adds
related fixes.
Fixes: d3358ecc54be ("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-07-13 15:53:57 +02:00
2022-11-10 10:08:55 -05:00
2023-08-08 17:05:43 -04:00
2023-07-28 18:45:02 +08:00
2023-02-17 19:07:48 +08:00
2022-11-10 10:08:55 -05:00
2023-05-16 16:12:21 -04:00
2023-06-19 16:45:36 -04:00
2023-08-03 15:30:53 -04:00
2022-12-05 16:06:07 -05:00
2023-01-04 09:28:04 +02:00
2023-07-25 12:44:47 -04:00
2023-07-25 12:44:47 -04:00
2022-10-30 20:07:17 +01:00
2022-12-05 16:06:07 -05:00
2023-06-12 16:42:37 -04:00
2022-11-21 09:23:00 -05:00
2023-07-25 12:44:47 -04:00
2023-07-25 12:44:47 -04:00
2022-08-23 12:40:34 +02:00
2023-07-25 12:44:47 -04:00
2022-12-05 16:06:08 -05:00
2022-12-23 10:08:35 -05:00
2022-12-05 16:06:07 -05:00
2022-12-05 16:06:08 -05:00
2023-07-25 12:44:47 -04:00
2022-04-18 11:25:13 +08:00
2023-01-30 23:23:02 +01:00
2022-02-10 07:12:16 +01:00
2023-07-25 23:21:42 +02:00
2022-10-30 20:07:17 +01:00
2023-06-12 16:42:37 -04:00
2023-07-25 12:44:47 -04:00
2023-07-13 11:29:40 +02:00
2023-07-25 12:44:47 -04:00
2023-01-11 15:18:08 +01:00
2023-05-05 07:26:53 +02:00
2022-12-05 16:06:07 -05:00
2023-07-25 12:44:47 -04:00
2023-02-07 14:33:48 -05:00
2023-07-25 12:44:47 -04:00
2022-10-31 11:01:31 -04:00
2023-08-03 15:30:53 -04:00
2022-12-05 16:06:07 -05:00
2022-11-10 10:08:55 -05:00
2023-07-28 18:45:02 +08:00
2023-01-20 12:27:24 -05:00
2023-07-25 12:44:47 -04:00
2022-12-23 10:14:51 -05:00
2023-08-02 16:32:44 +08:00
2023-07-25 12:44:47 -04:00
2022-12-23 10:08:35 -05:00
2023-07-25 12:44:47 -04:00
2023-08-03 15:30:53 -04:00
2022-12-23 10:07:03 -05:00
2022-12-05 16:06:07 -05:00
2023-07-13 11:29:40 +02:00
2023-07-25 12:44:47 -04:00
2022-12-23 10:14:51 -05:00
2023-07-25 12:44:47 -04:00
2022-12-05 16:06:07 -05:00
2023-07-28 18:45:03 +08:00
2022-11-02 13:58:17 -04:00
2023-06-12 13:24:31 +02:00
2022-10-31 11:01:31 -04:00
2022-10-31 11:01:31 -04:00
2023-06-19 16:45:36 -04:00
2022-10-31 11:01:31 -04:00
2022-12-05 16:06:07 -05:00
2022-02-10 07:12:16 +01:00
2022-11-10 10:08:55 -05:00
2023-06-12 13:24:31 +02:00
2023-07-25 12:44:47 -04:00
2023-07-25 12:44:47 -04:00
2022-11-07 07:17:55 +01:00
2023-07-13 11:29:40 +02:00
2022-10-21 13:47:56 -04:00
2023-07-25 12:44:47 -04:00
2023-07-25 12:44:47 -04:00
2022-07-08 17:57:34 -04:00
2023-07-11 14:40:04 +02:00
2023-01-20 12:27:24 -05:00
2023-07-25 12:44:47 -04:00
2022-08-23 12:35:37 +02:00
2023-08-03 09:40:50 -04:00
2023-05-10 16:45:42 -04:00
2023-07-06 17:28:08 +08:00
2023-05-02 10:57:22 +02:00
2022-04-18 11:25:13 +08:00
2023-03-30 13:51:33 +02:00
2022-12-05 16:06:07 -05:00
2022-11-10 10:08:55 -05:00
2022-12-09 14:10:28 -05:00
2022-02-08 23:07:58 -05:00
2023-07-14 12:52:18 -04:00
2023-02-23 12:55:37 -07:00
2023-07-12 13:21:40 +08:00
2022-02-08 23:07:58 -05:00
2023-07-13 11:29:40 +02:00
2022-12-05 16:06:07 -05:00
2023-07-31 14:41:36 +08:00
2023-04-10 12:18:17 +09:00
2022-10-31 11:01:31 -04:00
2023-05-03 09:05:17 -04:00
2023-07-31 11:33:51 -04:00
2023-03-14 12:12:13 +00:00
2023-08-07 13:41:43 -04:00
2022-04-18 11:25:13 +08:00
2023-07-31 20:34:32 +08:00
2023-07-25 12:44:47 -04:00
2023-05-15 17:14:46 -04:00
2023-07-17 17:23:15 +08:00
2023-08-03 15:30:53 -04:00
2022-02-10 07:12:16 +01:00
2023-07-25 12:44:47 -04:00
2023-07-28 10:11:01 -04:00
2023-06-27 10:09:46 +08:00
2022-10-31 11:01:31 -04:00
2023-07-12 13:21:40 +08:00
2023-05-03 09:05:24 -04:00
2023-06-09 13:52:40 -04:00
2023-05-16 16:12:21 -04:00
2023-07-25 12:44:47 -04:00
2023-07-25 12:44:47 -04:00
2022-02-08 23:07:58 -05:00
2022-11-10 10:08:55 -05:00
2023-06-16 11:01:16 +02:00
2023-07-12 13:21:40 +08:00
2022-02-28 10:33:45 -05:00
2023-06-29 09:55:50 -04:00
2023-07-25 12:44:47 -04:00
2023-07-25 12:44:47 -04:00
2023-06-12 13:24:31 +02:00
2023-03-15 01:38:19 +01:00
2022-12-05 16:06:07 -05:00
2022-12-05 16:06:07 -05:00
2023-07-13 11:29:40 +02:00
2023-07-25 12:44:47 -04:00
2023-07-12 13:21:41 +08:00
2022-08-23 12:35:37 +02:00
2023-07-13 10:26:27 +02:00
2023-04-21 15:16:00 +08:00
2023-07-28 10:11:01 -04:00
2022-12-22 10:31:47 -05:00
2023-08-04 15:03:42 -04:00
2022-10-31 11:01:31 -04:00
2022-12-07 16:04:16 -05:00
2023-08-07 13:41:44 -04:00
2023-02-03 13:10:01 +01:00
2023-07-25 12:44:47 -04:00
2023-07-13 11:29:40 +02:00
2023-06-01 12:40:16 -04:00
2023-05-10 16:45:42 -04:00
2022-08-20 21:18:15 -04:00
2022-12-05 16:06:07 -05:00
2023-07-21 09:00:38 +02:00
2022-08-23 12:35:37 +02:00