]> git.pld-linux.org Git - packages/glibc.git/commitdiff
- fix 'res_query.c:251: __libc_res_nquery: Assertion `hp != hp2' failed' failures.
authorPaweł Sikora <pluto@pld-linux.org>
Wed, 23 Nov 2011 18:31:20 +0000 (18:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    glibc-pr13013.patch -> 1.1
    glibc.spec -> 1.938

glibc-pr13013.patch [new file with mode: 0644]
glibc.spec

diff --git a/glibc-pr13013.patch b/glibc-pr13013.patch
new file mode 100644 (file)
index 0000000..46893fe
--- /dev/null
@@ -0,0 +1,51 @@
+--- 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
index 9d1bcdff537829bab8293027675d018b92dfe93f..53a206b5138394d3f03c1be0b93e8b8a4f482209 100644 (file)
@@ -33,7 +33,7 @@ Summary(tr.UTF-8):    GNU libc
 Summary(uk.UTF-8):     GNU libc версії
 Name:          glibc
 Version:       2.14.1
-Release:       2
+Release:       2.1
 Epoch:         6
 License:       LGPL v2.1+
 Group:         Libraries
@@ -86,6 +86,7 @@ Patch38:      1055_all_glibc-resolv-dynamic.patch
 Patch39:       %{name}-git.patch
 Patch40:       %{name}-bad-fix.patch
 Patch41:       %{name}-pr12892.patch
+Patch42:       %{name}-pr13013.patch
 URL:           http://www.gnu.org/software/libc/
 %{?with_selinux:BuildRequires: audit-libs-devel}
 BuildRequires: autoconf
@@ -952,6 +953,7 @@ mv %{name}-ports-%{ports_version} ports
 %patch40 -p1
 # revert broken fix
 %patch41 -p1
+%patch42 -p1
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
This page took 0.03425 seconds and 4 git commands to generate.