From 969447d688888cef3a2729a8cd0214404e4636f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Malo?= Date: Thu, 27 Feb 2003 04:01:20 +0000 Subject: [PATCH] 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 --- CHANGES | 3 +++ server/config.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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; -- 2.47.3