Date: Fri, 12 Jan 2001 23:39:36 +0000 From: Tony Finch <dot@dotat.at> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/24295: incorrect comment in strlcat.c Message-ID: <E14HDnE-0008GP-00@hand.dotat.at>
index | next in thread | raw e-mail
>Number: 24295
>Category: bin
>Synopsis: incorrect comment in strlcat.c
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Jan 12 15:50:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Tony Finch
>Release: FreeBSD 4.2-BETA-20001113 i386
>Organization:
Covalent Technologies Inc.
>Environment:
>Description:
>How-To-Repeat:
>Fix:
Either rev. 1.4 of strlcat.c in OpenBSD's cvs or this patch which uses
slightly different wording:
--- strlcat.c 1999/08/10 05:58:57 1.2
+++ strlcat.c 2001/01/12 23:28:15
@@ -38,7 +38,8 @@
* Appends src to string dst of size siz (unlike strncat, siz is the
* full size of dst, not space left). At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
- * Returns strlen(src); if retval >= siz, truncation occurred.
+ * Returns the smaller of strlen(dst) + strlen(src) and siz + strlen(src);
+ * if retval >= siz, truncation occurred.
*/
size_t strlcat(dst, src, siz)
char *dst;
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E14HDnE-0008GP-00>
