=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/servconf.c,v retrieving revision 1.347 retrieving revision 1.348 diff -u -r1.347 -r1.348 --- src/usr.bin/ssh/servconf.c 2019/01/23 21:50:56 1.347 +++ src/usr.bin/ssh/servconf.c 2019/01/24 02:34:52 1.348 @@ -1,5 +1,5 @@ -/* $OpenBSD: servconf.c,v 1.347 2019/01/23 21:50:56 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.348 2019/01/24 02:34:52 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -839,6 +839,7 @@ /* 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 == '/') fatal("%s: missing host in %s", __func__, what); @@ -1157,7 +1158,7 @@ const char *filename, int linenum, int *activep, struct connection_info *connectinfo) { - char *cp, ***chararrayptr, **charptr, *arg, *arg2, *p; + char ch, *cp, ***chararrayptr, **charptr, *arg, *arg2, *p; int cmdline = 0, *intptr, value, value2, n, port; SyslogFacility *log_facility_ptr; LogLevel *log_level_ptr; @@ -1251,8 +1252,8 @@ port = 0; p = arg; } else { - char ch; arg2 = NULL; + ch = '\0'; p = hpdelim2(&arg, &ch); if (p == NULL || ch == '/') fatal("%s line %d: bad address:port usage", @@ -1881,9 +1882,8 @@ */ xasprintf(&arg2, "*:%s", arg); } else { - char ch; - arg2 = xstrdup(arg); + ch = '\0'; p = hpdelim2(&arg, &ch); if (p == NULL || ch == '/') { fatal("%s line %d: missing host in %s",