summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/auth-skey.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-10-16 20:57:53 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-10-16 20:57:53 +0000
commitbe408c87bdf05935bdfc24ac463dfbba7fdb9559 (patch)
tree5b3b09a0bd7149a66e887430a330fdc9b4957d4e /usr.bin/ssh/auth-skey.c
parent1c5bf77d2c9607a4739b64c0197d923276ae04c7 (diff)
snprintf
Diffstat (limited to 'usr.bin/ssh/auth-skey.c')
-rw-r--r--usr.bin/ssh/auth-skey.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/auth-skey.c b/usr.bin/ssh/auth-skey.c
index fe3103bd352..9ec17049438 100644
--- a/usr.bin/ssh/auth-skey.c
+++ b/usr.bin/ssh/auth-skey.c
@@ -1,5 +1,5 @@
#include "includes.h"
-RCSID("$Id: auth-skey.c,v 1.1 1999/10/07 21:45:02 markus Exp $");
+RCSID("$Id: auth-skey.c,v 1.2 1999/10/16 20:57:52 deraadt Exp $");
#include "ssh.h"
#include <sha1.h>
@@ -116,7 +116,7 @@ skey_fake_keyinfo(char *username)
memset(up, 0, 20); /* SHA1 specific */
free(up);
- (void)sprintf(skeyprompt,
+ (void)snprintf(skeyprompt, sizeof skeyprompt,
"otp-%.*s %d %.*s",
SKEY_MAX_HASHNAME_LEN,
skey_get_algorithm(),
@@ -139,7 +139,8 @@ skey_fake_keyinfo(char *username)
} while (--i != 0);
pbuf[12] = '\0';
- (void)sprintf(skeyprompt, "otp-%.*s %d %.*s",
+ (void)snprintf(skeyprompt, sizeof skeyprompt,
+ "otp-%.*s %d %.*s",
SKEY_MAX_HASHNAME_LEN,
skey_get_algorithm(),
99, SKEY_MAX_SEED_LEN, pbuf);