mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Not sure if we were taking the size of the right thing previously.
Zero out the sockaddr_in before having accept() write to it. This un-confuses bcheck on Solaris, at least.
This commit is contained in:
parent
0819e7c3c6
commit
4cddcf96a5
@ -1174,7 +1174,8 @@ static void accept_connection(void)
|
||||
/* allocate and initialise struct connection */
|
||||
conn = new_connection();
|
||||
|
||||
sin_size = (socklen_t)sizeof(struct sockaddr);
|
||||
sin_size = sizeof(addrin);
|
||||
memset(&addrin, 0, sin_size);
|
||||
conn->socket = accept(sockin, (struct sockaddr *)&addrin,
|
||||
&sin_size);
|
||||
if (conn->socket == -1) err(1, "accept()");
|
||||
|
Loading…
Reference in New Issue
Block a user