[resend] memccpy() question
Jakub Jelinek
jakub@redhat.com
Tue Mar 25 10:40:00 GMT 2003
On Tue, Mar 25, 2003 at 02:05:16AM -0800, Roland McGrath wrote:
> > From the POSIX description:
> >
> > The memccpy() function shall copy bytes from memory area s2 into s1,
> > stopping after the first occurrence of byte c (converted to an
> > unsigned char) is copied, or after n bytes are copied, whichever comes
> > first.
> >
> > I'd conclude that memccpy must not touch the memory after the character.
>
> I concur. Note that we have string/stratcliff.c to test exactly this kind
> of issue for some other string functions. It seems appropriate to test
> memccpy there too.
And string/test-{mem,st}*.c test for the behaviour near the mapping end too,
just test-memccpy.c is not written (yet).
Jakub
More information about the Libc-hacker
mailing list