diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-04-12 23:39:26 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-04-12 23:39:26 +0000 |
commit | 19066a112baff6107781dc337b27e557f43098c2 (patch) | |
tree | 55200517aa7e6912f8d623b4b8ef340dc9de6495 /sshd.c | |
parent | d69dab3cde47c7e17382de556449bfda0fb28deb (diff) |
- stevesk@cvs.openbsd.org 2001/04/12 20:09:38
[misc.c misc.h readconf.c servconf.c ssh.c sshd.c]
robust port validation; ok markus@ jakob@
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: sshd.c,v 1.192 2001/04/11 16:25:30 lebel Exp $"); | 43 | RCSID("$OpenBSD: sshd.c,v 1.193 2001/04/12 20:09:38 stevesk Exp $"); |
44 | 44 | ||
45 | #include <openssl/dh.h> | 45 | #include <openssl/dh.h> |
46 | #include <openssl/bn.h> | 46 | #include <openssl/bn.h> |
@@ -611,7 +611,11 @@ main(int ac, char **av) | |||
611 | fprintf(stderr, "too many ports.\n"); | 611 | fprintf(stderr, "too many ports.\n"); |
612 | exit(1); | 612 | exit(1); |
613 | } | 613 | } |
614 | options.ports[options.num_ports++] = atoi(optarg); | 614 | options.ports[options.num_ports++] = a2port(optarg); |
615 | if (options.ports[options.num_ports-1] == 0) { | ||
616 | fprintf(stderr, "Bad port number.\n"); | ||
617 | exit(1); | ||
618 | } | ||
615 | break; | 619 | break; |
616 | case 'g': | 620 | case 'g': |
617 | options.login_grace_time = atoi(optarg); | 621 | options.login_grace_time = atoi(optarg); |