mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-21 20:01:54 +00:00
Zero packet buffers before building output, to reduce risk of information leakage.
This commit is contained in:
1 parent
cd2ddb9904
commit
fa78573778
8 files changed
+30
-6
No files matched your search
@@ -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