summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2003-04-14 22:24:01 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2003-04-14 22:24:01 +0000
commit4319316c3951835623b59499d2157d55a07e0005 (patch)
treebedc157d887a4d3535976f3f873aaa1003a3f050 /usr.sbin
parent888d7082841b52797c3c0e80038d7b50bfcb69a3 (diff)
%d is 12 chars not 10, also sneak an easy snprintf; this code is currently
not used
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_install/sign/pgp_sign.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pkg_install/sign/pgp_sign.c b/usr.sbin/pkg_install/sign/pgp_sign.c
index f2b3eda99d6..43d5653a167 100644
--- a/usr.sbin/pkg_install/sign/pgp_sign.c
+++ b/usr.sbin/pkg_install/sign/pgp_sign.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgp_sign.c,v 1.2 2001/04/08 16:45:48 espie Exp $ */
+/* $OpenBSD: pgp_sign.c,v 1.3 2003/04/14 22:24:00 pvalchev Exp $ */
/*-
* Copyright (c) 1999 Marc Espie.
*
@@ -255,10 +255,10 @@ handle_pgp_passphrase()
}
default:
{
- char buf[10];
+ char buf[12];
(void)close(fd[1]);
- (void)sprintf(buf, "%d", fd[0]);
+ (void)snprintf(buf, sizeof(buf), "%d", fd[0]);
(void)setenv("PGPPASSFD", buf, 1);
}
}