summaryrefslogtreecommitdiff
path: root/daemon/httpauthd.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-07-22 16:55:14 +0000
committerStef Walter <stef@memberwebs.com>2004-07-22 16:55:14 +0000
commit6be6d1dd25f2e7f2f1de6c0091e9aeae2ea1918c (patch)
tree1454a6bb0ec09fb6b105171d7aab29a217b30a39 /daemon/httpauthd.c
parent166f69df6dd704626c1b09ae60145956435b67e1 (diff)
- Fixed uninitialized memory bug
- Imported updated sock_any and hash code
Diffstat (limited to 'daemon/httpauthd.c')
-rw-r--r--daemon/httpauthd.c5
1 files changed, 4 insertions, 1 deletions
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);