summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/strerror.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-01 17:00:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-01 17:00:41 +0000
commit173d01b7c1e9a5d7ba5a6c696a8019061dc41bda (patch)
tree8c8b7bb08108dca24afcee3bbe301e8ba6f76e81 /sys/lib/libsa/strerror.c
parent3e42965de9054a39afc4957c4f099218e709ae51 (diff)
strcpy/strcat/sprintf removal in all bootblocks. various testing by
various people. outside of some messy things in src/gnu, only one thing in the main tree now violates this rule: bind
Diffstat (limited to 'sys/lib/libsa/strerror.c')
-rw-r--r--sys/lib/libsa/strerror.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/lib/libsa/strerror.c b/sys/lib/libsa/strerror.c
index d39aea7059e..04f2fbe4720 100644
--- a/sys/lib/libsa/strerror.c
+++ b/sys/lib/libsa/strerror.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strerror.c,v 1.5 1997/06/10 16:39:16 millert Exp $ */
+/* $OpenBSD: strerror.c,v 1.6 2003/06/01 17:00:33 deraadt Exp $ */
/* $NetBSD: strerror.c,v 1.11 1996/10/13 02:29:08 christos Exp $ */
/*-
@@ -42,7 +42,7 @@ char *
strerror(err)
int err;
{
-static char ebuf[64];
+ static char ebuf[64];
switch (err) {
case EADAPT:
@@ -75,7 +75,7 @@ static char ebuf[64];
return "Invalid argument";
default:
- sprintf(ebuf, "Unknown error: code %d", err);
+ snprintf(ebuf, sizeof ebuf, "Unknown error: code %d", err);
return ebuf;
}
}