This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [libc-alpha] Re: [libc-alpha] Re: [open-source] Re: Wish for2002
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: <netch at lucky dot net>, Kaz Kylheku <kaz at ashi dot footprints dot net>, Francois Leclerc <leclerc at austin dot sns dot slb dot com>, <libc-alpha at sources dot redhat dot com>, <open-source at csl dot sri dot com>, <security-audit at ferret dot lmh dot ox dot ac dot uk>, Russ Allbery <rra at stanford dot edu>, <a dot josey at opengroup dot org>, <tiemann at redhat dot com>
- Date: Wed, 9 Jan 2002 15:26:07 +0000 (GMT)
- Subject: Re: [libc-alpha] Re: [libc-alpha] Re: [open-source] Re: Wish for2002
On Wed, 9 Jan 2002, Andreas Schwab wrote:
> You cannot find it because it is undefined, by the virtue of the C
> standard, which has explicit wording to make it undefined (restrict
> pointers). Does the BSD manpage make the pointer parameters of strlcat
> restricted pointers?
The explicit wording is not the use of "restrict" - which is irrelevant
unless it also occurs on the definition of the function, and then only
relevant in conjunction with the rest of the text of the function which
says what bytes are accessed through which argument - but an actual
statement that "If copying takes place between objects that overlap, the
behavior is undefined." (7.21.2.1#2 for memcpy, 7.21.2.3#2 for strcpy,
7.21.2.4#2 for strncpy). (It does not explicitly say what the objects
that must not overlap are - but presumably one is the bytes that may be
read from one string, and the other is the bytes that are written to the
other string.)
--
Joseph S. Myers
jsm28@cam.ac.uk