mirror of
https://github.com/yrutschle/sslh.git
synced 2026-10-22 18:12:10 +03:00
main_loop: initialize in_socket
in_socket may be used uninitialized if no addresses are available.
~~~
sslh-select.c:415:8: warning: Function call argument is an uninitialized value
check_access_rights(in_socket, cnx[i].proto->service)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
This commit is contained in:
1 parent
5cf591a254
commit
cfd0163a5b
1 file changed
+2
-1
+2
-1
@@ -301,7 +301,8 @@ void main_loop(int listen_sockets[], int num_addr_listen)
|
||||
fd_set fds_r, fds_w; /* reference fd sets (used to init the next 2) */
|
||||
fd_set readfds, writefds; /* working read and write fd sets */
|
||||
struct timeval tv;
|
||||
int max_fd, in_socket, i, j, res;
|
||||
int max_fd, i, j, res;
|
||||
int in_socket = 0;
|
||||
struct connection *cnx;
|
||||
int num_cnx; /* Number of connections in *cnx */
|
||||
int num_probing = 0; /* Number of connections currently probing
|
||||
|
||||
Reference in new issue
Block a user