glibc/0038-nss_dns-Fix-assertion-failure-in-_nss_dns_getcanonna.patch

25 lines
636 B
Diff

2016-04-11 Florian Weimer <fweimer@redhat.com>
[BZ #19865]
* resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Restore
original buffer before retry.
Index: glibc-2.23/resolv/nss_dns/dns-canon.c
===================================================================
--- glibc-2.23.orig/resolv/nss_dns/dns-canon.c
+++ glibc-2.23/resolv/nss_dns/dns-canon.c
@@ -144,6 +144,13 @@ _nss_dns_getcanonname_r (const char *nam
ptr += sizeof (uint16_t) + __ns_get16 (ptr);
}
}
+
+ /* Restore original buffer before retry. */
+ if (ansp.ptr != buf)
+ {
+ free (ansp.ptr);
+ ansp.ptr = buf;
+ }
}
out: