Date: Mon, 1 Jul 2002 19:42:11 -0700 (PDT) From: Neal Fachan <neal@isilon.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/40104: strerror has an off-by-one error Message-ID: <200207020242.g622gBLk092129@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 40104
>Category: misc
>Synopsis: strerror has an off-by-one error
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jul 01 19:50:01 PDT 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207020242.g622gBLk092129>
