This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Implement strlcat [BZ#178]
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Florian Weimer <fweimer at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 4 Dec 2015 11:31:54 -0800
- Subject: Re: [PATCH] Implement strlcat [BZ#178]
- Authentication-results: sourceware.org; auth=none
- References: <56547472 dot 3010302 at redhat dot com> <5661E452 dot 6000701 at cs dot ucla dot edu> <5661E80D dot 2040805 at redhat dot com>
On 12/04/2015 11:22 AM, Florian Weimer wrote:
I can add a static assert for sizeof (uintptr_t) == sizeof (size_t),
which is closer to what we need here.
Yes, thanks, that's even better than just a comment.
Pointer arithmetic in GCC leans towards
signedness, and signed overflow being undefined, strange things can
happen in the middle of the address space, close to (void *) SSIZE_MAX.
Ouch. I didn't know that. I'll add it to my list of things to worry
about :-).