summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-07-04 00:10:34 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-07-04 00:10:34 +0000
commitfbbfa8422f8317bcac829e1673dced62f49d59ba (patch)
tree9484c121bc8d93e492d8307f2572951c55fb83cf /sshd.c
parentb1bdc5a6adae8f5e4d4a4f67c5aba488b5993d5e (diff)
- deraadt@cvs.openbsd.org 2002/06/28 10:08:25
[sshd.c] range check -u option at invocation
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index d2524c4b..21db6d5c 100644
--- a/sshd.c
+++ b/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>
@@ -906,6 +906,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,