From 2c04861699c64c1237f0796ef197369919ca4667 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sat, 14 Sep 2013 14:51:48 +0000 Subject: [PATCH] WinNT MPM: crash-o-matic with "Listen " trunk patch: http://svn.apache.org/r1520368 Submitted by: trawick Reviewed by: covener, humbedooh git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1523261 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 6 ------ server/mpm/winnt/child.c | 10 +++++++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 4695a6710b..0fa06e5bc1 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.4.7 + *) WinNT MPM: Don't crash during child process initialization if the + Listen protocol is unrecognized. [Jeff Trawick] + *) modules: Fix some compiler warnings. [Guenter Knauf] * skiplist: Add skiplist capability to httpd [Jim Jagielski] diff --git a/STATUS b/STATUS index 92557cfdbf..d353e8f4f1 100644 --- a/STATUS +++ b/STATUS @@ -159,12 +159,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: +1: covener, jim, humbedooh - * WinNT MPM: crash-o-matic with "Listen " - trunk patch: http://svn.apache.org/r1520368 - 2.4.x patch: trunk patch works - +1: trawick, covener, humbedooh - - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index 7983851a86..aa7f557f04 100644 --- a/server/mpm/winnt/child.c +++ b/server/mpm/winnt/child.c @@ -296,7 +296,15 @@ static unsigned int __stdcall winnt_accept(void *lr_) core_sconf = ap_get_core_module_config(ap_server_conf->module_config); accf_name = apr_table_get(core_sconf->accf_map, lr->protocol); - if (strcmp(accf_name, "data") == 0) + if (!accf_name) { + accf = 0; + accf_name = "none"; + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, + APLOGNO(02531) "winnt_accept: Listen protocol '%s' has " + "no known accept filter. Using 'none' instead", + lr->protocol); + } + else if (strcmp(accf_name, "data") == 0) accf = 2; else if (strcmp(accf_name, "connect") == 0) accf = 1; -- 2.40.0