r4803 - in glibc-package/trunk/debian: . patches patches/any
Author: aurel32
Date: 2011-07-21 16:46:39 +0000 (Thu, 21 Jul 2011)
New Revision: 4803
Added:
glibc-package/trunk/debian/patches/any/submitted-resolv-assert.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
* Reenable patches/any/cvs-resolv-different-nameserver.diff. Add
patches/any/submitted-resolv-assert.diff to fix assertion triggered by the
previous patch. Closes: #632273, #632252.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2011-07-21 12:57:01 UTC (rev 4802)
+++ glibc-package/trunk/debian/changelog 2011-07-21 16:46:39 UTC (rev 4803)
@@ -13,6 +13,9 @@
- uses upstream RFTSIGZMB for exit signal selection when available.
* Disable multiarch support on amd64, kfreebsd-amd64, ppc64, sparc64 until
we fix the /lib64 -> /lib symlink issue. Closes: #632176.
+ * Reenable patches/any/cvs-resolv-different-nameserver.diff. Add
+ patches/any/submitted-resolv-assert.diff to fix assertion triggered by the
+ previous patch. Closes: #632273, #632252.
-- Aurelien Jarno <aurel32@debian.org> Sun, 10 Jul 2011 22:01:11 +0200
Added: glibc-package/trunk/debian/patches/any/submitted-resolv-assert.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/submitted-resolv-assert.diff (rev 0)
+++ glibc-package/trunk/debian/patches/any/submitted-resolv-assert.diff 2011-07-21 16:46:39 UTC (rev 4803)
@@ -0,0 +1,59 @@
+2011-07-21 Aurelien Jarno <aurel32@debian.org>
+
+ * resolv/res_query.c(__libc_res_nquery): Assign hp and hp2
+ depending n and resplen2 to catch cases where answer
+ equals answerp2.
+
+diff --git a/resolv/res_query.c b/resolv/res_query.c
+index 2f7cfaa..405fa68 100644
+--- a/resolv/res_query.c
++++ b/resolv/res_query.c
+@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp,
+ int *resplen2)
+ {
+ HEADER *hp = (HEADER *) answer;
++ HEADER *hp2;
+ int n, use_malloc = 0;
+ u_int oflags = statp->_flags;
+
+@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp,
+ /* __libc_res_nsend might have reallocated the buffer. */
+ hp = (HEADER *) *answerp;
+
+- /* We simplify the following tests by assigning HP to HP2. It
+- is easy to verify that this is the same as ignoring all
+- tests of HP2. */
+- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
+-
+- if (n < (int) sizeof (HEADER) && answerp2 != NULL
+- && *resplen2 > (int) sizeof (HEADER))
++ /* We simplify the following tests by assigning HP to HP2 or
++ vice versa. It is easy to verify that this is the same as
++ ignoring all tests of HP or HP2. */
++ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
+ {
+- /* Special case of partial answer. */
+- assert (hp != hp2);
+- hp = hp2;
++ hp2 = hp;
+ }
+- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
+- && n > (int) sizeof (HEADER))
++ else
+ {
+- /* Special case of partial answer. */
+- assert (hp != hp2);
+- hp2 = hp;
++ hp2 = (HEADER *) *answerp2;
++ if (n < (int) sizeof (HEADER))
++ {
++ hp = hp2;
++ }
+ }
+
++ /* Make sure both hp and hp2 are defined */
++ assert((hp != NULL) && (hp2 != NULL));
++
+ if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
+ && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
+ #ifdef DEBUG
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2011-07-21 12:57:01 UTC (rev 4802)
+++ glibc-package/trunk/debian/patches/series 2011-07-21 16:46:39 UTC (rev 4803)
@@ -269,7 +269,8 @@
any/cvs-unique_sym_table-corruptions.diff
any/submitted-mqueue-throw.diff
any/cvs-addmntent.diff
-#any/cvs-resolv-different-nameserver.diff
+any/cvs-resolv-different-nameserver.diff
+any/submitted-resolv-assert.diff
any/cvs-fnmatch.diff
any/cvs-ifunc.diff
powerpc/submitted-ifunc.diff
Reply to: