From nobody@FreeBSD.org  Mon Jul  1 19:42:11 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DF91837B400
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  1 Jul 2002 19:42:11 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A713843E26
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  1 Jul 2002 19:42:11 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g622gBOT092130
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 1 Jul 2002 19:42:11 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g622gBLk092129;
	Mon, 1 Jul 2002 19:42:11 -0700 (PDT)
Message-Id: <200207020242.g622gBLk092129@www.freebsd.org>
Date: Mon, 1 Jul 2002 19:42:11 -0700 (PDT)
From: Neal Fachan <neal@isilon.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: strerror has an off-by-one error
X-Send-Pr-Version: www-1.0

>Number:         40104
>Category:       misc
>Synopsis:       strerror has an off-by-one error
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 01 19:50:01 PDT 2002
>Closed-Date:    Tue Jul 02 23:28:37 PDT 2002
>Last-Modified:  Tue Jul 02 23:28:37 PDT 2002
>Originator:     Neal Fachan
>Release:        All
>Organization:
>Environment:
>Description:
Index: strerror.c
===================================================================
RCS file: /usr/local/ncvs/atera/src/lib/libc/string/strerror.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -p -u -r1.1.1.1 -r1.2
--- strerror.c  9 Mar 2002 02:33:57 -0000       1.1.1.1
+++ strerror.c  2 Jul 2002 02:39:34 -0000       1.2
@@ -96,7 +96,7 @@ strerror(num)
         * supplied buffer, inverting the number string.
         */
        strcpy(ebuf, unknown_prefix);
-       for (p = ebuf + sizeof unknown_prefix - 1; t >= tmp; )
+       for (p = ebuf + sizeof unknown_prefix - 1; t > tmp; )
                *p++ = *--t;
        *p = '\0';
        return (ebuf);
>How-To-Repeat:

>Fix:
      
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mini 
State-Changed-When: Tue Jul 2 23:28:11 PDT 2002 
State-Changed-Why:  
Comitted, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40104 
>Unformatted:
