summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Varshavchik2013-08-25 14:30:52 -0400
committerSam Varshavchik2013-08-25 14:43:52 -0400
commit3587050bb0729dfc8759a84e7ffbc860662b1b25 (patch)
tree475fcc9889bbf681c6cefc1a3c0e1193a1942c4c
parentf64a9a29518a151510b65812d945a721019260cc (diff)
downloadcourier-libs-3587050bb0729dfc8759a84e7ffbc860662b1b25.tar.bz2
Clear entire ipv6 address for an invalid address.
Should never take this error path anyway. If we did, it means that ::ffff: followed by the output of rfc1035_ntoa_ipv4() was not parsable by inet_pton().
-rw-r--r--rfc1035/rfc1035qa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rfc1035/rfc1035qa.c b/rfc1035/rfc1035qa.c
index 7335624..46fc204 100644
--- a/rfc1035/rfc1035qa.c
+++ b/rfc1035/rfc1035qa.c
@@ -227,7 +227,7 @@ unsigned k;
strcpy(buf, "::ffff:");
rfc1035_ntoa_ipv4( &ia4ptr[k], buf+sizeof("::ffff:")-1);
if (inet_pton( AF_INET6, buf, (*iaptr)+ *iasize) <= 0)
- memset( (*iaptr)+ *iasize, 0, sizeof(*iaptr));
+ memset( (*iaptr)+ *iasize, 0, sizeof(**iaptr));
++*iasize;
}
if (ia4len)