Explorar o código

Merge pull request #203 from JoseGoncalves/fixes

Fix uninitialized argument in getsockname().
Sergey Lyubka %!s(int64=12) %!d(string=hai) anos
pai
achega
f32e14478f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      mongoose.c

+ 1 - 1
mongoose.c

@@ -4917,7 +4917,7 @@ struct mg_connection *mg_connect(const char *host, int port, int use_ssl,
     conn = NULL;
 #endif // NO_SSL
   } else {
-    socklen_t len;
+    socklen_t len = sizeof(struct sockaddr);
     conn->buf_size = MAX_REQUEST_SIZE;
     conn->buf = (char *) (conn + 1);
     conn->ctx = &fake_ctx;