mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Don't clear tcpfd for literal address server records.
They have smaller structs which don't include that field,
so this is a buffer overlow.
Error introduced in f5cdb007d8
This commit is contained in:
@@ -739,12 +739,13 @@ int add_update_server(int flags,
|
||||
serv->addr = *addr;
|
||||
if (source_addr)
|
||||
serv->source_addr = *source_addr;
|
||||
|
||||
serv->tcpfd = -1;
|
||||
}
|
||||
|
||||
serv->flags = flags;
|
||||
serv->domain = alloc_domain;
|
||||
serv->domain_len = strlen(alloc_domain);
|
||||
serv->tcpfd = -1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user