Message ID | 56F58AF1.3000908@redhat.com |
---|---|
State | New |
Headers | show |
On 25 Mar 2016 20:01, Florian Weimer wrote: > As explained in the bug, this function seems to be dead code in typical > configurations, so there does not seem to be any security impact. lgtm -mike
2016-03-25 Florian Weimer <fweimer@redhat.com> [BZ #19865] * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Restore original buffer before retry. diff --git a/resolv/nss_dns/dns-canon.c b/resolv/nss_dns/dns-canon.c index 5c5c6db..072104f 100644 --- a/resolv/nss_dns/dns-canon.c +++ b/resolv/nss_dns/dns-canon.c @@ -154,6 +154,13 @@ _nss_dns_getcanonname_r (const char *name, char *buffer, size_t buflen, ptr += rdatalen; } } + + /* Restore original buffer before retry. */ + if (ansp.ptr != buf) + { + free (ansp.ptr); + ansp.ptr = buf; + } } out: