diff options
author | mini <mini@FreeBSD.org> | 2002-07-03 06:28:04 +0000 |
---|---|---|
committer | mini <mini@FreeBSD.org> | 2002-07-03 06:28:04 +0000 |
commit | 46aac0b82f4235ec836db7bda7446aac4bcf5101 (patch) | |
tree | 4c3a46953ee6e1c29d700f4bc26dd453944525cf /lib/libc/string/strerror.c | |
parent | 43e208a3ee3b9dea43ec1c077c70919cc8332c7c (diff) | |
download | FreeBSD-src-46aac0b82f4235ec836db7bda7446aac4bcf5101.zip FreeBSD-src-46aac0b82f4235ec836db7bda7446aac4bcf5101.tar.gz |
Fix off-by-one error.
PR: misc/40104
Submitted by: Neal Fachan <neal@isilon.com>
MFC after: 3 days
Diffstat (limited to 'lib/libc/string/strerror.c')
-rw-r--r-- | lib/libc/string/strerror.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index 55840f1..32e35aa 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -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); |