Bug 24295

Summary: incorrect comment in strlcat.c
Product: Base System Reporter: Tony Finch <dot>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Tony Finch 2001-01-12 23:50:01 UTC

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;
Comment 1 Chris D.Faulhaber freebsd_committer freebsd_triage 2001-01-17 20:53:10 UTC
State Changed
From-To: open->closed

Committed, thanks!