summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-04-12 23:39:26 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-04-12 23:39:26 +0000
commit19066a112baff6107781dc337b27e557f43098c2 (patch)
tree55200517aa7e6912f8d623b4b8ef340dc9de6495 /sshd.c
parentd69dab3cde47c7e17382de556449bfda0fb28deb (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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sshd.c b/sshd.c
index bde1ac344..eaf3d322a 100644
--- a/sshd.c
+++ b/sshd.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: sshd.c,v 1.192 2001/04/11 16:25:30 lebel Exp $"); 43RCSID("$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);