From: William A. Rowe Jr Date: Mon, 15 Oct 2007 23:49:32 +0000 (+0000) Subject: mpm_winnt: Fix null pointer dereference X-Git-Tag: 2.2.7~300 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a74d3344c98083437e11ae56b72730c39a06e8b3;p=thirdparty%2Fapache%2Fhttpd.git mpm_winnt: Fix null pointer dereference PR 42572 Backports: 563489 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@584975 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 471f6848ecf..381b9611698 100644 --- a/STATUS +++ b/STATUS @@ -182,11 +182,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK: niq says: Yes, when we add r584842 to the proposal. rpluem says: Yes. - * mpm_winnt: Fix null pointer dereference - PR 42572 - http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/child.c?r1=505027&r2=563489 - +1: niq (this is clear enough to vote 'blind'), rpluem - * mod_proxy_http: Don't mangle proxied URLs PR 42592 http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c?r1=582655&r2=583803&pathrev=583803 diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index 4fcad5c34a0..d302253e4e8 100644 --- a/server/mpm/winnt/child.c +++ b/server/mpm/winnt/child.c @@ -1187,7 +1187,10 @@ void child_main(apr_pool_t *pconf) CloseHandle(child_handles[i]); /* Reset the scoreboard entry for the thread we just whacked */ score_idx = apr_hash_get(ht, &child_handles[i], sizeof(HANDLE)); - ap_update_child_status_from_indexes(0, *score_idx, SERVER_DEAD, NULL); + if (score_idx) { + ap_update_child_status_from_indexes(0, *score_idx, + SERVER_DEAD, NULL); + } } ap_log_error(APLOG_MARK,APLOG_NOTICE, APR_SUCCESS, ap_server_conf, "Child %d: All worker threads have exited.", my_pid);