mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Zero packet buffers before building output, to reduce risk of information leakage.
This commit is contained in:
@@ -29,9 +29,19 @@ void end_opt6(int container)
|
||||
PUTSHORT(len, p);
|
||||
}
|
||||
|
||||
void reset_counter(void)
|
||||
{
|
||||
/* Clear out buffer when starting from begining */
|
||||
if (daemon->outpacket.iov_base)
|
||||
memset(daemon->outpacket.iov_base, 0, daemon->outpacket.iov_len);
|
||||
|
||||
save_counter(0);
|
||||
}
|
||||
|
||||
int save_counter(int newval)
|
||||
{
|
||||
int ret = outpacket_counter;
|
||||
|
||||
if (newval != -1)
|
||||
outpacket_counter = newval;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user