[U-Boot] [PATCH v12 1/8] libc: move strlcpy() from ether.c to string.c

Marek Vasut
2014-04-01T09:16:07Z

On Tuesday, April 01, 2014 at 10:46:52 AM, Kuo-Jung Su wrote:
> From: Kuo-Jung Su <dantesu@faraday-tech.com>
>
> It would be better to have strlcpy() moved to lib/string.c,
> so that it could be reused by others without enabling
> USB Gadget Ethernet.
>
> Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
> CC: Albert Aribaud <albert.u.boot@aribaud.net>
> CC: Wolfgang Denk <wd@denx.de>
> Cc: Marek Vasut <marex@denx.de>

Good article on strlcpy() is here [1]. I suggest we remove strlcpy() altogether
and use standard posix functions like strncpy() instead. I am on Ulrich Drepper
side on this, strlcpy() is just hiding bugs.

[1] https://lwn.net/Articles/507319/

Best regards,
Marek Vasut