From: André Malo Date: Thu, 27 Feb 2003 04:01:20 +0000 (+0000) Subject: fill out parms->err_directive while looking for open parents. X-Git-Tag: 2.0.45~150 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=969447d688888cef3a2729a8cd0214404e4636f0;p=thirdparty%2Fapache%2Fhttpd.git fill out parms->err_directive while looking for open parents. Otherwise when trying to log the error (a) we segfault (if the directive was in another file) (b) we show a wrong occurrence line number (start line of the previous container or somewhat) or probably segfault, too (if no previous container/directive exists). PR: 17093 Reviewed by: Jeff Trawick, Bill Stoddard git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@98811 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index c3412a301e2..9469885749a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.45 + *) Fix segfault which occurred when a section in an included + configuration file was not closed. PR 17093. [André Malo] + *) Enhance the behavior of mod_isapi's WriteClient() callback to provide better emulation for isapi modules that presume that the first WriteClient() call may send status and headers. An example diff --git a/server/config.c b/server/config.c index 701bafbe42b..68ff4f219e2 100644 --- a/server/config.c +++ b/server/config.c @@ -1170,7 +1170,9 @@ AP_DECLARE(const char *) ap_build_config(cmd_parms *parms, curr_parent->filename, curr_parent->line_num, curr_parent->directive); - curr_parent = curr_parent->parent; + + parms->err_directive = curr_parent; + curr_parent = curr_parent->parent; } return errmsg;