This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: C11 bounds checking interfaces in glibc?
On Wed, Feb 15, 2012 at 09:11:18PM +0000, Joseph S. Myers wrote:
> I don't think there are any plans; see
> <http://sourceware.org/ml/libc-alpha/2011-12/msg00066.html> for what I
> said about them and
> <http://sourceware.org/ml/libc-alpha/2011-12/msg00064.html> for what
> Roland said. In essence, they are rather a mess and *most* of them (other
> than the reentrant functions) probably are not desirable for use in new
> code - but there are probably uses for them for compiling some existing
> bodies of code that have been retrofitted with them.
So how do we get string functions with overflow checking instead?
Is the general recommendation everyone has to use libbsd now?
It's mainly of me being sick of writing
#define strlcpy(d,s,l) snprintf(d,l,"%s",s), d
everywhere. strcpy_s/strncpy_s/strcat_s seemed like reasonable
replacements.
-Andi