summaryrefslogtreecommitdiff
path: root/usr.bin/skey
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-04 21:20:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-04 21:20:21 +0000
commit7988a4af4d2001c160c11ad53c7a9d777c02e5df (patch)
tree27c8be8a57d25ca094a1291dc4ecf93e9941ceea /usr.bin/skey
parentf004530327861aff88211c717b09f06134b3868a (diff)
oflow
Diffstat (limited to 'usr.bin/skey')
-rw-r--r--usr.bin/skey/skey.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/skey/skey.c b/usr.bin/skey/skey.c
index b9e5aa0eb55..64643b7f17c 100644
--- a/usr.bin/skey/skey.c
+++ b/usr.bin/skey/skey.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: skey.c,v 1.12 1999/03/06 20:27:41 millert Exp $*/
+/* * $OpenBSD: skey.c,v 1.13 1999/12/04 21:20:20 deraadt Exp $*/
/*
* S/KEY v1.1b (skey.c)
*
@@ -62,7 +62,9 @@ main(argc, argv)
case 'p':
if (i + 1 == argc)
usage(argv[0]);
- (void)strcpy(passwd, argv[++i]);
+ if (strlcpy(passwd, argv[++i], sizeof(passwd)) >
+ sizeof(passwd))
+ errx(1, "Password too long");
pass = 1;
break;
case 'x':