From 6be6d1dd25f2e7f2f1de6c0091e9aeae2ea1918c Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 22 Jul 2004 16:55:14 +0000 Subject: - Fixed uninitialized memory bug - Imported updated sock_any and hash code --- daemon/httpauthd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'daemon/httpauthd.c') diff --git a/daemon/httpauthd.c b/daemon/httpauthd.c index e5b8dcb..c238a1a 100644 --- a/daemon/httpauthd.c +++ b/daemon/httpauthd.c @@ -340,9 +340,12 @@ int main(int argc, char* argv[]) continue; } + memset(&sany, 0, sizeof(sany)); + SANY_LEN(sany) = sizeof(sany); + /* Get the peer name */ if(getpeername(fd, &SANY_ADDR(sany), &SANY_LEN(sany)) == -1 || - sock_any_ntop(&sany, peername, MAXPATHLEN) == -1) + sock_any_ntop(&sany, peername, MAXPATHLEN, SANY_OPT_NOPORT) == -1) ha_messagex(LOG_WARNING, "%d: couldn't get peer address", fd); else ha_messagex(LOG_INFO, "%d: accepted connection from: %s", fd, peername); -- cgit v1.2.3