mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
* resolv/res_init.c (__res_vinit): Always assign to statp->nscount
after reading name server list.
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
2008-12-07 Ulrich Drepper <drepper@redhat.com>
|
2008-12-07 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* resolv/res_init.c (__res_vinit): Always assign to statp->nscount
|
||||||
|
after reading name server list.
|
||||||
|
|
||||||
* nis/nss_nis/nis-hosts.c (_nss_nis_gethostbyname4_r): Fix memory
|
* nis/nss_nis/nis-hosts.c (_nss_nis_gethostbyname4_r): Fix memory
|
||||||
handling for host name aliases.
|
handling for host name aliases.
|
||||||
|
|
||||||
|
@ -545,8 +545,7 @@ _nss_nis_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
|
|||||||
size_t h_name_len = strlen (host.h_name) + 1;
|
size_t h_name_len = strlen (host.h_name) + 1;
|
||||||
if (h_name_len >= buflen)
|
if (h_name_len >= buflen)
|
||||||
goto erange;
|
goto erange;
|
||||||
/* Potentially the string and the destination buffer overlap. */
|
(*pat)->name = memcpy (buffer, host.h_name, h_name_len);
|
||||||
(*pat)->name = memmove (buffer, host.h_name, h_name_len);
|
|
||||||
|
|
||||||
free (result);
|
free (result);
|
||||||
|
|
||||||
|
@ -420,7 +420,6 @@ __res_vinit(res_state statp, int preinit) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nserv > 1)
|
|
||||||
statp->nscount = nserv;
|
statp->nscount = nserv;
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
if (nservall - nserv > 0) {
|
if (nservall - nserv > 0) {
|
||||||
|
Reference in New Issue
Block a user