From owner-freebsd-bugs Fri Jan 12 15:50:19 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 581C837B402 for ; Fri, 12 Jan 2001 15:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f0CNo1D25319; Fri, 12 Jan 2001 15:50:01 -0800 (PST) (envelope-from gnats) Received: from hand.dotat.at (sfo-gw.covalent.net [207.44.198.62]) by hub.freebsd.org (Postfix) with ESMTP id E7FDC37B401 for ; Fri, 12 Jan 2001 15:40:29 -0800 (PST) Received: from fanf by hand.dotat.at with local (Exim 3.15 #3) id 14HDnE-0008GP-00 for FreeBSD-gnats-submit@freebsd.org; Fri, 12 Jan 2001 23:39:36 +0000 Message-Id: Date: Fri, 12 Jan 2001 23:39:36 +0000 From: Tony Finch Reply-To: Tony Finch To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/24295: incorrect comment in strlcat.c Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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