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

Marek Vasut marex at denx.de
Tue Apr 1 11:16:07 CEST 2014


On Tuesday, April 01, 2014 at 10:46:52 AM, Kuo-Jung Su wrote:
> From: Kuo-Jung Su <dantesu at 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 at faraday-tech.com>
> CC: Albert Aribaud <albert.u.boot at aribaud.net>
> CC: Wolfgang Denk <wd at denx.de>
> Cc: Marek Vasut <marex at 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


More information about the U-Boot mailing list