[PATCH v2 1/5] lib: string: Fix strlcpy return value
Simon Glass
sjg at chromium.org
Thu Mar 25 01:38:14 CET 2021
Hi Sean,
On Thu, 11 Mar 2021 at 18:15, Sean Anderson <seanga2 at gmail.com> wrote:
>
> strlcpy should always return the number of bytes copied. We were
> accidentally missing the nul-terminator. We also always used to return a
> non-zero value, even if we did not actually copy anything.
>
> Fixes: 23cd138503 ("Integrate USB gadget layer and USB CDC driver layer")
>
> Signed-off-by: Sean Anderson <seanga2 at gmail.com>
> ---
>
> Changes in v2:
> - New
>
> lib/string.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
Please can you add a test while you are here? Might be easier on the
-next branch.
Regards,
Simon
More information about the U-Boot
mailing list