mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
nss_dns: Fix assertion failure in _nss_dns_getcanonname_r [BZ #19865]
This commit is contained in:
@ -144,6 +144,13 @@ _nss_dns_getcanonname_r (const char *name, char *buffer, size_t buflen,
|
||||
ptr += sizeof (uint16_t) + __ns_get16 (ptr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Restore original buffer before retry. */
|
||||
if (ansp.ptr != buf)
|
||||
{
|
||||
free (ansp.ptr);
|
||||
ansp.ptr = buf;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
|
Reference in New Issue
Block a user