mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-27 12:31:03 +00:00
Don't add an empty CNAME alias for a space before a comma.
split() replaces the comma with a space and then writes a NUL over every space before it, so "a.example ,target.example" becomes "a.example\0\0target.example". The --cname loop steps over one NUL and the following spaces only, stops on the second NUL and adds an empty alias, i.e., a CNAME for the root name. A second such entry is then rejected as "duplicate CNAME". Step over the NULs, too. Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
1 parent
738c049988
commit
a570a139d5
1 file changed
+1
-1
+1
-1
@@ -5046,7 +5046,7 @@ err:
|
||||
new->target = target;
|
||||
new->ttl = ttl;
|
||||
|
||||
for (arg += arglen+1; *arg && isspace((unsigned char)*arg); arg++);
|
||||
for (arg += arglen+1; arg != last && (!*arg || isspace((unsigned char)*arg)); arg++);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user