=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/servconf.c,v retrieving revision 1.382 retrieving revision 1.383 diff -u -r1.382 -r1.383 --- src/usr.bin/ssh/servconf.c 2021/09/06 00:36:01 1.382 +++ src/usr.bin/ssh/servconf.c 2022/02/08 08:59:12 1.383 @@ -1,5 +1,5 @@ -/* $OpenBSD: servconf.c,v 1.382 2021/09/06 00:36:01 millert Exp $ */ +/* $OpenBSD: servconf.c,v 1.383 2022/02/08 08:59:12 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -844,7 +844,7 @@ { u_int i; int port; - char *host, *arg, *oarg, ch; + char *host, *arg, *oarg; int where = opcode == sPermitOpen ? FORWARD_LOCAL : FORWARD_REMOTE; const char *what = lookup_opcode_name(opcode); @@ -862,9 +862,8 @@ /* Otherwise treat it as a list of permitted host:port */ for (i = 0; i < num_opens; i++) { oarg = arg = xstrdup(opens[i]); - ch = '\0'; - host = hpdelim2(&arg, &ch); - if (host == NULL || ch == '/') + host = hpdelim(&arg); + if (host == NULL) fatal_f("missing host in %s", what); host = cleanhostname(host); if (arg == NULL || ((port = permitopen_port(arg)) < 0)) @@ -1210,7 +1209,7 @@ struct connection_info *connectinfo, int *inc_flags, int depth, struct include_list *includes) { - char ch, *str, ***chararrayptr, **charptr, *arg, *arg2, *p, *keyword; + char *str, ***chararrayptr, **charptr, *arg, *arg2, *p, *keyword; int cmdline = 0, *intptr, value, value2, n, port, oactive, r, found; SyslogFacility *log_facility_ptr; LogLevel *log_level_ptr; @@ -1323,9 +1322,8 @@ p = arg; } else { arg2 = NULL; - ch = '\0'; - p = hpdelim2(&arg, &ch); - if (p == NULL || ch == '/') + p = hpdelim(&arg); + if (p == NULL) fatal("%s line %d: bad address:port usage", filename, linenum); p = cleanhostname(p); @@ -2154,9 +2152,8 @@ xasprintf(&arg2, "*:%s", arg); } else { arg2 = xstrdup(arg); - ch = '\0'; - p = hpdelim2(&arg, &ch); - if (p == NULL || ch == '/') { + p = hpdelim(&arg); + if (p == NULL) { fatal("%s line %d: %s missing host", filename, linenum, keyword); }