mirror of git://sourceware.org/git/glibc.git
[BZ #4726]
* resolv/res_send.c (__libc_res_nsend): Initialize all of the memory allocated for the name server address.
This commit is contained in:
parent
1465dd0f9e
commit
0f8f993cef
|
|
@ -1,5 +1,9 @@
|
||||||
2007-08-21 Ulrich Drepper <drepper@redhat.com>
|
2007-08-21 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[BZ #4726]
|
||||||
|
* resolv/res_send.c (__libc_res_nsend): Initialize all of the
|
||||||
|
memory allocated for the name server address.
|
||||||
|
|
||||||
[BZ #4946]
|
[BZ #4946]
|
||||||
* nscd/connections.c (handle_request): Using sendfile always
|
* nscd/connections.c (handle_request): Using sendfile always
|
||||||
requires that mmap is used for the database.
|
requires that mmap is used for the database.
|
||||||
|
|
|
||||||
|
|
@ -425,9 +425,12 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
|
||||||
EXT(statp).nsaddrs[n] =
|
EXT(statp).nsaddrs[n] =
|
||||||
malloc(sizeof (struct sockaddr_in6));
|
malloc(sizeof (struct sockaddr_in6));
|
||||||
if (EXT(statp).nsaddrs[n] != NULL) {
|
if (EXT(statp).nsaddrs[n] != NULL) {
|
||||||
memcpy(EXT(statp).nsaddrs[n],
|
memset (mempcpy(EXT(statp).nsaddrs[n],
|
||||||
&statp->nsaddr_list[ns],
|
&statp->nsaddr_list[ns],
|
||||||
sizeof (struct sockaddr_in));
|
sizeof (struct sockaddr_in)),
|
||||||
|
'\0',
|
||||||
|
sizeof (struct sockaddr_in6)
|
||||||
|
- sizeof (struct sockaddr_in));
|
||||||
EXT(statp).nssocks[n] = -1;
|
EXT(statp).nssocks[n] = -1;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue