summaryrefslogtreecommitdiff
path: root/lib/libcom_err/com_err.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-19 07:12:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-19 07:12:43 +0000
commit36cb109beb9efb72a6d48ac7127a9f379657de1e (patch)
treeb109e47cd2026a61932f39e6c8296632a44e5350 /lib/libcom_err/com_err.c
parent8be025d256ee6bb72fd3f36daa2a1adc4b8011f1 (diff)
use more snprintf
Diffstat (limited to 'lib/libcom_err/com_err.c')
-rw-r--r--lib/libcom_err/com_err.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libcom_err/com_err.c b/lib/libcom_err/com_err.c
index b6ce80e026e..8c1fac1a683 100644
--- a/lib/libcom_err/com_err.c
+++ b/lib/libcom_err/com_err.c
@@ -60,7 +60,7 @@ error_message (long code)
strncpy(msg, p, sizeof(msg) - 1);
msg[sizeof(msg) - 1] = 0;
} else
- sprintf(msg, "Unknown error %ld", code);
+ snprintf(msg, sizeof msg, "Unknown error %ld", code);
return msg;
}