This is the mail archive of the
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>, libc-alpha at sourceware dot org
- Cc: Zack Weinberg <zackw at panix dot com>
- Date: Fri, 4 Dec 2015 08:06:58 -0800
- Subject: Re: [PATCH] Implement strlcat [BZ#178]
- Authentication-results: sourceware.org; auth=none
- References: <56547472 dot 3010302 at redhat dot com> <5654B1FE dot 5020100 at cs dot ucla dot edu> <5654B796 dot 7070302 at redhat dot com> <5656E018 dot 5020608 at cs dot ucla dot edu> <565F211A dot 2030909 at redhat dot com> <56607CD1 dot 3050209 at cs dot ucla dot edu> <CAKCAbMgDMK9wjfNEJYW7e-cN9s5aVhun6V08OXrcOgYKRYF7_g at mail dot gmail dot com> <5660825E dot 9020901 at cs dot ucla dot edu> <CAKCAbMi2zSJRjS=ceg8UvTYY18UrCWysaOFX+OzvKZQfeR9+SA at mail dot gmail dot com> <5660C545 dot 1090805 at cs dot ucla dot edu> <56617536 dot 9040308 at redhat dot com>
On 12/04/2015 03:12 AM, Florian Weimer wrote:
There is no "_exactly_". The BSDs differ.
I think the behavior is the same.
No, as I mentioned elsewhere, the NetBSD iimplementation does not allow
strlcpy(0, SRC, 0) whereas the FreeBSD implementation does (and this
disagrees with the FreeBSD documentation where it says the destination
must be a string). I haven't investigated strlcpy but I expect that it
It is a bit of a mess.
It's certainly OK to reach out to the OpenBSD and FreeBSD and NetBSD
folks here, in particular as to whether applications rely on these weird
corner cases. I am pretty sure they do not, and that it'd be better to
make them errors.