projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bde00ed
)
locate_host: initialize hostname buffer so we don't send bullshit to the session...
author
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 29 May 2012 21:31:31 +0000
(23:31 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 29 May 2012 21:31:31 +0000
(23:31 +0200)
webcit/locate_host.c
patch
|
blob
|
history
diff --git
a/webcit/locate_host.c
b/webcit/locate_host.c
index 1db2832e99676b58ccba99a4b27996b7023b54c1..72a73cca7395dad5bb04def1761118f5b4afe39c 100644
(file)
--- a/
webcit/locate_host.c
+++ b/
webcit/locate_host.c
@@
-22,7
+22,7
@@
void locate_host(StrBuf *tbuf, int client_socket)
{
struct sockaddr_in6 clientaddr;
unsigned int addrlen = sizeof(clientaddr);
- char clienthost[NI_MAXHOST];
+ char clienthost[NI_MAXHOST]
= ""
;
getpeername(client_socket, (struct sockaddr *)&clientaddr, &addrlen);
getnameinfo((struct sockaddr *)&clientaddr, addrlen, clienthost, sizeof(clienthost), NULL, 0, 0);