mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
2585. [bug] Uninitialized socket name could be referenced via a
statistics channel, triggering an assertion failure in XML rendering. [RT #19427]
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,3 +1,7 @@
|
|||||||
|
2585. [bug] Uninitialized socket name could be referenced via a
|
||||||
|
statistics channel, triggering an assertion failure in
|
||||||
|
XML rendering. [RT #19427]
|
||||||
|
|
||||||
2584. [bug] alpha: gcc optimization could break atomic operations.
|
2584. [bug] alpha: gcc optimization could break atomic operations.
|
||||||
[RT #19227]
|
[RT #19227]
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: socket.c,v 1.317 2009/03/05 03:13:55 marka Exp $ */
|
/* $Id: socket.c,v 1.318 2009/04/18 01:28:17 jinmei Exp $ */
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@@ -1885,6 +1885,9 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(sock->name, 0, sizeof(sock->name));
|
||||||
|
sock->tag = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* set up list of readers and writers to be initially empty
|
* set up list of readers and writers to be initially empty
|
||||||
*/
|
*/
|
||||||
@@ -2324,9 +2327,6 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
|
|||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(sock->name, 0, sizeof(sock->name));
|
|
||||||
sock->tag = NULL;
|
|
||||||
|
|
||||||
sock->references = 1;
|
sock->references = 1;
|
||||||
*socketp = sock;
|
*socketp = sock;
|
||||||
|
|
||||||
@@ -2532,11 +2532,14 @@ isc_socket_close(isc_socket_t *sock) {
|
|||||||
type = sock->type;
|
type = sock->type;
|
||||||
fd = sock->fd;
|
fd = sock->fd;
|
||||||
sock->fd = -1;
|
sock->fd = -1;
|
||||||
|
memset(sock->name, 0, sizeof(sock->name));
|
||||||
|
sock->tag = NULL;
|
||||||
sock->listener = 0;
|
sock->listener = 0;
|
||||||
sock->connected = 0;
|
sock->connected = 0;
|
||||||
sock->connecting = 0;
|
sock->connecting = 0;
|
||||||
sock->bound = 0;
|
sock->bound = 0;
|
||||||
isc_sockaddr_any(&sock->peer_address);
|
isc_sockaddr_any(&sock->peer_address);
|
||||||
|
|
||||||
UNLOCK(&sock->lock);
|
UNLOCK(&sock->lock);
|
||||||
|
|
||||||
closesocket(manager, sock, fd);
|
closesocket(manager, sock, fd);
|
||||||
|
Reference in New Issue
Block a user