mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-21 20:01:54 +00:00
Fix a couple of crashes on malformed config files.
Thanks to Stephan Zeisberg and american fuzzy lop http://lcamtuf.coredump.cx/afl/
This commit is contained in:
1 parent
b2a9c571eb
commit
561441320f
2 files changed
+6
-2
No files matched your search
+4
-1
@@ -3848,9 +3848,12 @@ err:
|
||||
while (arg != last)
|
||||
{
|
||||
alias = canonicalise_opt(arg);
|
||||
|
||||
if (!alias || !target)
|
||||
ret_err(_("bad CNAME"));
|
||||
|
||||
for (new = daemon->cnames; new; new = new->next)
|
||||
if (hostname_isequal(new->alias, arg))
|
||||
if (hostname_isequal(new->alias, alias))
|
||||
ret_err(_("duplicate CNAME"));
|
||||
new = opt_malloc(sizeof(struct cname));
|
||||
new->next = daemon->cnames;
|
||||
|
||||
Reference in new issue
Block a user