summaryrefslogtreecommitdiffstats
path: root/runtime/nsd_ptcp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-06-07 10:47:06 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-06-07 10:47:06 +0200
commit363c16b9de007b2abb72edc08fc600a59e0fb1a1 (patch)
treea25e3a4cbf555e1d64d1fa0a97c841b065233c04 /runtime/nsd_ptcp.c
parentddad5b3299191142f500b25e01b827e40e873cd7 (diff)
downloadrsyslog-363c16b9de007b2abb72edc08fc600a59e0fb1a1.tar.gz
rsyslog-363c16b9de007b2abb72edc08fc600a59e0fb1a1.tar.xz
rsyslog-363c16b9de007b2abb72edc08fc600a59e0fb1a1.zip
dnscache: bugfix, potentially grabagge data accessed
This was a bug of the new implementation, never released code.
Diffstat (limited to 'runtime/nsd_ptcp.c')
-rw-r--r--runtime/nsd_ptcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/nsd_ptcp.c b/runtime/nsd_ptcp.c
index 06f62b7e..fd883d21 100644
--- a/runtime/nsd_ptcp.c
+++ b/runtime/nsd_ptcp.c
@@ -249,7 +249,7 @@ Abort(nsd_t *pNsd)
* rgerhards, 2008-03-31
*/
static rsRetVal
-FillRemHost(nsd_ptcp_t *pThis, struct sockaddr *pAddr)
+FillRemHost(nsd_ptcp_t *pThis, struct sockaddr_storage *pAddr)
{
uchar szIP[NI_MAXHOST] = "";
uchar szHname[NI_MAXHOST] = "";
@@ -314,7 +314,7 @@ AcceptConnReq(nsd_t *pNsd, nsd_t **ppNew)
* of this function. -- rgerhards, 2008-12-01
*/
memcpy(&pNew->remAddr, &addr, sizeof(struct sockaddr_storage));
- CHKiRet(FillRemHost(pNew, (struct sockaddr*) &addr));
+ CHKiRet(FillRemHost(pNew, &addr));
/* set the new socket to non-blocking IO -TODO:do we really need to do this here? Do we always want it? */
if((sockflags = fcntl(iNewSock, F_GETFL)) != -1) {