summaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32/0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-04-08 11:54:43 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-04-08 11:55:15 +0300
commit06d067525070d325db98a4a95fedad6eb40f7060 (patch)
treea56e7f9f9f699b603bbc69d6f271eb56e160312d /main/libc0.9.32/0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch
parent604b69f2490d8cff569394fc539f28d64553c9a3 (diff)
downloadaports-06d067525070d325db98a4a95fedad6eb40f7060.tar.bz2
aports-06d067525070d325db98a4a95fedad6eb40f7060.tar.xz
main/libc0.9.32: fix res_close hanging with ipv6
Diffstat (limited to 'main/libc0.9.32/0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch')
-rw-r--r--main/libc0.9.32/0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/main/libc0.9.32/0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch b/main/libc0.9.32/0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch
new file mode 100644
index 000000000..4567817f1
--- /dev/null
+++ b/main/libc0.9.32/0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch
@@ -0,0 +1,34 @@
+From 0256aca9b486f77af72ea941dfc852c2c4cff15b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Fri, 8 Apr 2011 11:51:03 +0300
+Subject: [PATCH] resolv: fix res_close not to hang with ipv6
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The memory release loop is missing an obvious counter increment.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+---
+ libc/inet/resolv.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
+index 47bab75..1e394d4 100644
+--- a/libc/inet/resolv.c
++++ b/libc/inet/resolv.c
+@@ -3006,9 +3006,9 @@ void res_close(void)
+ #ifdef __UCLIBC_HAS_IPV6__
+ {
+ char *p1 = (char*) &(_res.nsaddr_list[0]);
+- int m = 0;
++ int m;
+ /* free nsaddrs[m] if they do not point to nsaddr_list[x] */
+- while (m < ARRAY_SIZE(_res._u._ext.nsaddrs)) {
++ for (m = 0; m < ARRAY_SIZE(_res._u._ext.nsaddrs); m++) {
+ char *p2 = (char*)(_res._u._ext.nsaddrs[m]);
+ if (p2 < p1 || (p2 - p1) > sizeof(_res.nsaddr_list))
+ free(p2);
+--
+1.7.1
+