Fix off-by-one error.

PR:		misc/40104
Submitted by:	Neal Fachan <neal@isilon.com>
MFC after:	3 days
This commit is contained in:
Jonathan Mini 2002-07-03 06:28:04 +00:00
parent 93c163325e
commit 16f33a4885

View File

@ -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);