mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix crash parsing a --synth-domain with no prefix.
Problem introduced in 2.79/6b2b564ac34cb3c862f168e6b1457f9f0b9ca69c
This commit is contained in:
@@ -42,6 +42,9 @@ version 2.80
|
||||
(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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user