]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
In winnt_accept() (server/mpm/winnt/child.c), there's a call to PostQueuedCompletionS...
authorChristophe Jaillet <jailletc36@apache.org>
Mon, 6 Jan 2020 21:29:42 +0000 (21:29 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Mon, 6 Jan 2020 21:29:42 +0000 (21:29 +0000)
When compiling the code with Visual Studio 2019 (v 16.3.10), we get a warning than BytesRead is not initialized. When using /RTCu (run-time checks for uninitialzed variables), the program crashes on this line with an exception.

If we initialize the variable to 0, the problem is solved.

PR 63965

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1872394 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/child.c

index d752b825ff27790a95b1a2693c389fa3f2049c61..fd63cfc66687b7fa2237e40e7bf73e5a49beb79c 100644 (file)
@@ -365,7 +365,7 @@ static unsigned int __stdcall winnt_accept(void *lr_)
     ap_listen_rec *lr = (ap_listen_rec *)lr_;
     apr_os_sock_info_t sockinfo;
     winnt_conn_ctx_t *context = NULL;
-    DWORD BytesRead;
+    DWORD BytesRead = 0;
     SOCKET nlsd;
     LPFN_ACCEPTEX lpfnAcceptEx = NULL;
     LPFN_GETACCEPTEXSOCKADDRS lpfnGetAcceptExSockaddrs = NULL;