[PATCH v2 2/5] lib: string: Implement strlcat

Simon Glass sjg at chromium.org
Thu Mar 25 01:38:16 CET 2021


On Thu, 11 Mar 2021 at 18:15, Sean Anderson <seanga2 at gmail.com> wrote:
>
> This introduces strlcat, which provides a safer interface than strncat. It
> never copies more than its size bytes, including the terminating nul. In
> addition, it never reads past dest[size - 1], even if dest is not
> nul-terminated.
>
> This also removes the stub for dwc3 now that we have a proper
> implementation.
>
> Signed-off-by: Sean Anderson <seanga2 at gmail.com>
> ---
>
> Changes in v2:
> - New
>
>  drivers/usb/dwc3/linux-compat.h |  6 ------
>  include/linux/string.h          |  3 +++
>  lib/string.c                    | 19 +++++++++++++++++++
>  3 files changed, 22 insertions(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list