diff --git a/CHANGELOG b/CHANGELOG index 3fe3e77..792ef3d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -41,8 +41,11 @@ version 2.80 Fix missing fatal errors with some malformed options (server, local, address, rebind-domain-ok, ipset, alias). Thanks to Eugene Lozovoy for spotting the problem. - - + + Fix crash on startup with a --synth-domain which has no prefix. + Introduced in 2.79. Thanks to Andreas Engel for the bug report. + + version 2.79 Fix parsing of CNAME arguments, which are confused by extra spaces. Thanks to Diego Aguirre for spotting the bug. diff --git a/src/option.c b/src/option.c index 9f1b84f..c203826 100644 --- a/src/option.c +++ b/src/option.c @@ -2232,7 +2232,9 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma char *star; new->next = daemon->synth_domains; daemon->synth_domains = new; - if ((star = strrchr(new->prefix, '*')) && *(star+1) == 0) + if (new->prefix && + (star = strrchr(new->prefix, '*')) + && *(star+1) == 0) { *star = 0; new->indexed = 1;