Handle empty hostmaster in --auth-soa

Spotted by Max Julian Hofmann and the Advanced Research Team at CrowdStrike
This commit is contained in:
Simon Kelley
2021-07-21 00:15:15 +01:00
parent b741059549
commit ac7eeea44d

View File

@@ -2231,7 +2231,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
arg = comma;
comma = split(arg);
daemon->hostmaster = opt_string_alloc(arg);
for (cp = daemon->hostmaster; *cp; cp++)
for (cp = daemon->hostmaster; cp && *cp; cp++)
if (*cp == '@')
*cp = '.';