Browse Source

Initialize socket struct to satisfy static code analysis

See #794
bel2125 5 năm trước cách đây
mục cha
commit
3550ccaa12
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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__)
 #if !defined(__ZEPHYR__)
 	int on = 1;
 	int on = 1;
 #endif
 #endif
+	memset(&so, 0, sizeof(so));
 
 
 	if ((so.sock = accept(listener->sock, &so.rsa.sa, &len))
 	if ((so.sock = accept(listener->sock, &so.rsa.sa, &len))
 	    == INVALID_SOCKET) {
 	    == INVALID_SOCKET) {