From 06d067525070d325db98a4a95fedad6eb40f7060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 8 Apr 2011 11:54:43 +0300 Subject: main/libc0.9.32: fix res_close hanging with ipv6 --- ...esolv-fix-res_close-not-to-hang-with-ipv6.patch | 34 ++++++++++++++++++++++ main/libc0.9.32/APKBUILD | 4 ++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 main/libc0.9.32/0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch (limited to 'main/libc0.9.32') 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?= +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 +--- + 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 + diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD index da08ae3a6..b03ba92de 100644 --- a/main/libc0.9.32/APKBUILD +++ b/main/libc0.9.32/APKBUILD @@ -4,7 +4,7 @@ pkgname=libc$_abiver _gitver= pkgver=0.9.32_rc3 _ver=${pkgver/_/-} -pkgrel=4 +pkgrel=5 pkgdesc="C library for developing embedded Linux systems" url=http://uclibc.org license="LGPL-2" @@ -26,6 +26,7 @@ source="http://uclibc.org/downloads/uClibc-${_ver}.tar.bz2 0003-ldso-support-RTLD_NOLOAD.patch 0001-libdl-rudimentary-locking-for-dlopen-dlsym-dlclose.patch 0001-malloc-standard-synchronize-on-fork.patch + 0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch uclibcconfig.x86 uclibcconfig.x86_64 uclibcconfig.i486 @@ -126,6 +127,7 @@ b4fb68ad3d0e8331b1b40c30eb21dfdc 0002-stdlib-fix-arc4random-return-type-to-u_in 6147efd2eee5af5e734896823c2d1a3d 0003-ldso-support-RTLD_NOLOAD.patch 3e151ae3d3613dff9296d166aca3a800 0001-libdl-rudimentary-locking-for-dlopen-dlsym-dlclose.patch 30f27fe51fdc4d121166ad2af18dfb8d 0001-malloc-standard-synchronize-on-fork.patch +2ab8c375fe1cd406319b4c5ef538da2b 0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch 3f87dc1f171493f5fde3bf4ae7180b8a uclibcconfig.x86 be0a43796e418d2733d91f9888d213c3 uclibcconfig.x86_64 3f87dc1f171493f5fde3bf4ae7180b8a uclibcconfig.i486 -- cgit v1.2.3