Ver código fonte

Initialize socket struct to satisfy static code analysis

See #794
bel2125 5 anos atrás
pai
commit
3550ccaa12
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      src/civetweb.c

+ 1 - 0
src/civetweb.c

@@ -18908,6 +18908,7 @@ accept_new_connection(const struct socket *listener, struct mg_context *ctx)
 #if !defined(__ZEPHYR__)
 	int on = 1;
 #endif
+	memset(&so, 0, sizeof(so));
 
 	if ((so.sock = accept(listener->sock, &so.rsa.sa, &len))
 	    == INVALID_SOCKET) {