summaryrefslogtreecommitdiff
path: root/bin/expr/expr.c
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1998-07-27 17:06:48 +0000
committermycroft <mycroft@NetBSD.org>1998-07-27 17:06:48 +0000
commit0e2f9ea92334bc1ce28a4d7c3aa272d9609fa465 (patch)
tree1c5eab75d968b8397acb8d195a3cfe06d3a57ce0 /bin/expr/expr.c
parente6f2ea1f40f8835b1bb38146e63bf6ab3555b08d (diff)
__AUDIT__ cleanup.
Diffstat (limited to 'bin/expr/expr.c')
-rw-r--r--bin/expr/expr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/expr/expr.c b/bin/expr/expr.c
index 850e0e92694..1bc7d0af526 100644
--- a/bin/expr/expr.c
+++ b/bin/expr/expr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: expr.c,v 1.5 1997/07/20 17:33:00 christos Exp $ */
+/* $NetBSD: expr.c,v 1.6 1998/07/27 17:06:48 mycroft Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
@@ -174,7 +174,8 @@ to_string(vp)
if (tmp == NULL) {
err(2, "%s", "");
}
- sprintf(tmp, "%d", vp->u.i);
+ (void)snprintf(tmp, 25, "%d", vp->u.i);
+ tmp[24] = '\0';
vp->type = string;
vp->u.s = tmp;
}