[PATCH] Implement strlcpy [BZ #178]
Florian Weimer
fweimer@redhat.com
Mon Sep 15 14:45:00 GMT 2014
This patch adds an implementation of strlcpy.
I think it shows that we can do much better than custom implementations
in libbsd and random applications:
* This version is based on optimized strnlen and memcpy implementation.
* It has fortify support.
* In fortify mode, there a link-time warnings for common misuses.
(The location of the warning could be improved,
but this is a GCC issue.)
If this is patch is accepted, I will work on an implementation of
strlcat along similar lines.
--
Florian Weimer / Red Hat Product Security
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Implement-strlcpy-BZ-178.patch
Type: text/x-patch
Size: 27596 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140915/4bbf2cf4/attachment.bin>
More information about the Libc-alpha
mailing list