glibc/0038-nss_dns-Fix-assertion-failure-in-_nss_dns_getcanonna.patch
Dominique Leuenberger 043c4769d6 Accepting request 394999 from Base:System
- Import patches from 2.23 branch (forwarded request 394998 from Andreas_Schwab)

OBS-URL: https://build.opensuse.org/request/show/394999
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=202
2016-05-19 10:02:35 +00:00

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: