Summary: | Please add strlcpy and strlcat (attached) | ||
---|---|---|---|
Product: | glibc | Reporter: | rmh |
Component: | string | Assignee: | Florian Weimer <fweimer> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | alx.manpages, emaste, fweimer, glibc-bugs, jscott, sam, thepouar |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | unspecified | ||
Target Milestone: | 2.38 | ||
See Also: |
https://www.austingroupbugs.net/view.php?id=986 https://www.austingroupbugs.net/view.php?id=1591 |
||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: |
strlcat implementation
strlcpy implementation |
Description
rmh
2004-05-24 20:19:29 UTC
Created attachment 91 [details]
strlcat implementation
This is extracted from FreeBSD CVS. I assume the license is acceptable since it
is GPL/LGPL compatible.
Created attachment 92 [details]
strlcpy implementation
This is extracted from FreeBSD CVS. I assume the license is acceptable since it
is GPL/LGPL compatible.
This report contains no claims of justification for adding these interfaces. These have been suggested before and discussed on the mailing list. We don't consider them worthwhile. Please locate that old discussion for details. Subject: Re: Please add strlcpy and strlcat (attached)
On Tue, May 25, 2004 at 06:50:51PM -0000, roland at gnu dot org wrote:
>
> ------- Additional Comments From roland at gnu dot org 2004-05-25 18:50 -------
> This report contains no claims of justification for adding these interfaces.
> These have been suggested before and discussed on the mailing list.
> We don't consider them worthwhile. Please locate that old discussion for details.
Oh, I see this was discussed already. Sorry for the oversight.
I'm working on a patch to add this function. strlcpy and strlcat will be in the next POSIX edition (https://www.austingroupbugs.net/view.php?id=986). Florian sent a patch to libc-alpha in June: https://patchwork.sourceware.org/project/glibc/patch/87fsjp7rqz.fsf@oldenburg.str.redhat.com/. New patches posted: [PATCH 0/2] strlcpy/strlcat/wcslcpy/wcscat implementation <https://sourceware.org/pipermail/libc-alpha/2023-April/146967.html> Fixed for 2.38 via: commit 454a20c8756c9c1d55419153255fc7692b3d2199 Author: Florian Weimer <fweimer@redhat.com> Date: Wed Jun 14 18:10:08 2023 +0200 Implement strlcpy and strlcat [BZ #178] These functions are about to be added to POSIX, under Austin Group issue 986. The fortified strlcat implementation does not raise SIGABRT if the destination buffer does not contain a null terminator, it just inherits the non-failing regular strlcat behavior. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org> |