diff options
author | xebd <xeb@mail.ru> | 2018-10-26 06:26:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-26 06:26:07 +0300 |
commit | 17ff40f36a81dabecfb490b6d1fca70ae94c8c34 (patch) | |
tree | b74ccd22ab46ac054c433d52bac9e60b416bbc51 /accel-pppd/extra/ipv6pool.c | |
parent | 975b5470544503bc8c70b21320b33d715fd0850b (diff) | |
parent | 603800151415c69ceb3c9d986ef0c3487817cb67 (diff) | |
download | accel-ppp-17ff40f36a81dabecfb490b6d1fca70ae94c8c34.tar.gz accel-ppp-17ff40f36a81dabecfb490b6d1fca70ae94c8c34.zip |
Merge pull request #56 from themiron/addr-setup-fix
fix gateway address setup fail due memory corruption
Diffstat (limited to 'accel-pppd/extra/ipv6pool.c')
-rw-r--r-- | accel-pppd/extra/ipv6pool.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/accel-pppd/extra/ipv6pool.c b/accel-pppd/extra/ipv6pool.c index 6fa5cc53..4f29a280 100644 --- a/accel-pppd/extra/ipv6pool.c +++ b/accel-pppd/extra/ipv6pool.c @@ -83,6 +83,7 @@ static void generate_ippool(struct in6_addr *addr, int mask, int prefix_len) while (in6_addr_cmp(&ip, &end) <= 0) { it = malloc(sizeof(*it)); + memset(it, 0, sizeof(*it)); it->it.owner = &ipdb; INIT_LIST_HEAD(&it->it.addr_list); a = malloc(sizeof(*a)); @@ -119,6 +120,7 @@ static void generate_dppool(struct in6_addr *addr, int mask, int prefix_len) while (in6_addr_cmp(&ip, &end) <= 0) { it = malloc(sizeof(*it)); + memset(it, 0, sizeof(*it)); it->it.owner = &ipdb; INIT_LIST_HEAD(&it->it.prefix_list); a = malloc(sizeof(*a)); |