]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
fill out parms->err_directive while looking for open parents.
authorAndré Malo <nd@apache.org>
Thu, 27 Feb 2003 04:01:20 +0000 (04:01 +0000)
committerAndré Malo <nd@apache.org>
Thu, 27 Feb 2003 04:01:20 +0000 (04:01 +0000)
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
server/config.c

diff --git a/CHANGES b/CHANGES
index c3412a301e2dc9b89ca1b9fe16faefde906c6c65..9469885749a9ebe0858166c89482483df806c5c6 100644 (file)
--- 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
index 701bafbe42b1702df1b4eecae140c0586b4b00ab..68ff4f219e2a8bbc0b79238fdc9294d8114218ac 100644 (file)
@@ -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;