From 8384d5ed25f7d467bbd83e5853b1755bdadfd3ba Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 28 Jun 2002 10:08:26 +0000 Subject: range check -u option at invocation --- usr.bin/ssh/sshd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.bin') 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 #include @@ -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, -- cgit v1.2.3