Skip to content

Commit

Permalink
Merge pull request #369 from pi-hole/fix/synth-domain
Browse files Browse the repository at this point in the history
Apply patch: Fix crash parsing a --synth-domain with no prefix.
  • Loading branch information
AzureMarker authored Aug 31, 2018
2 parents 89c1db8 + 2d3e91d commit 0e04d64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dnsmasq/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -2212,7 +2212,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;
Expand Down

0 comments on commit 0e04d64

Please sign in to comment.