summaryrefslogtreecommitdiff
path: root/extra/dnsmasq/0001-Fix-wrong-size-in-memset-call.patch
blob: 05223cdb245fa3395836589daf457b16226ef8fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 71aaad9f663efda7032e27c201a7025ff6332a2d Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk>
Date: Thu, 18 Apr 2013 09:47:49 +0100
Subject: [PATCH] Fix wrong size in memset() call.

Thanks to Dave Reisner.
---
 src/ipset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ipset.c b/src/ipset.c
index a34ed96..f175fa4 100644
--- a/src/ipset.c
+++ b/src/ipset.c
@@ -110,7 +110,7 @@ static int new_add_to_ipset(const char *setname, const struct all_addr *ipaddr,
       return -1;
     }
   
-  memset(buffer, 0, sizeof(buffer));
+  memset(buffer, 0, BUFF_SZ);
 
   nlh = (struct nlmsghdr *)buffer;
   nlh->nlmsg_len = NL_ALIGN(sizeof(struct nlmsghdr));
-- 
1.8.2.1