| Summary: | incorrect comment in strlcat.c | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Tony Finch <dot> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed Committed, thanks! |
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;