summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-28 10:08:26 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-28 10:08:26 +0000
commit8384d5ed25f7d467bbd83e5853b1755bdadfd3ba (patch)
tree31304f1ad869abbf95a7ca2b6a0cef98f7d60cb9 /usr.bin
parent86fea73025c54bcb3f69ab29559519c5f7282019 (diff)
range check -u option at invocation
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sshd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 3a561e7dac8..d447ae1d401 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -42,7 +42,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.251 2002/06/25 18:51:04 markus Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.252 2002/06/28 10:08:25 deraadt Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@@ -882,6 +882,8 @@ main(int ac, char **av)
break;
case 'u':
utmp_len = atoi(optarg);
+ if (utmp_len < 0 || utmp_len > MAXHOSTNAMELEN)
+ usage();
break;
case 'o':
if (process_server_config_line(&options, optarg,