]> andersk Git - openssh.git/blobdiff - servconf.c
- (djm) OpenBSD CVS Sync
[openssh.git] / servconf.c
index 96ad18084c1b0c2d6a5897dae56d2b239b38ef01..deec167becb91080eeab8dcac70f685bfcaba2aa 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: servconf.c,v 1.140 2005/03/10 22:01:05 deraadt Exp $");
+RCSID("$OpenBSD: servconf.c,v 1.142 2005/06/17 02:44:33 djm Exp $");
 
 #include "ssh.h"
 #include "log.h"
@@ -398,7 +398,7 @@ parse_token(const char *cp, const char *filename,
 static void
 add_listen_addr(ServerOptions *options, char *addr, u_short port)
 {
-       int i;
+       u_int i;
 
        if (options->num_ports == 0)
                options->ports[options->num_ports++] = SSH_DEFAULT_PORT;
@@ -438,9 +438,10 @@ process_server_config_line(ServerOptions *options, char *line,
     const char *filename, int linenum)
 {
        char *cp, **charptr, *arg, *p;
-       int *intptr, value, i, n;
+       int *intptr, value, n;
        ServerOpCodes opcode;
        u_short port;
+       u_int i;
 
        cp = line;
        arg = strdelim(&cp);
@@ -532,6 +533,9 @@ parse_time:
 
        case sAddressFamily:
                arg = strdelim(&cp);
+               if (!arg || *arg == '\0')
+                       fatal("%s line %d: missing address family.",
+                           filename, linenum);
                intptr = &options->address_family;
                if (options->listen_addrs != NULL)
                        fatal("%s line %d: address family must be specified before "
This page took 0.039414 seconds and 4 git commands to generate.