]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix segfaults for configuration file syntax errors such as
authorJeff Trawick <trawick@apache.org>
Mon, 2 Apr 2001 17:08:03 +0000 (17:08 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 2 Apr 2001 17:08:03 +0000 (17:08 +0000)
"<Directory>" followed by "</Directory" and "<Directory>" followed
by "</Directoryz>"

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88649 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/config.c

diff --git a/CHANGES b/CHANGES
index 3541018e13b9099ef91f5e11a8acdf10908b92b2..a82c992817a5268c6c84c953a96f781ed0e1da3f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 Changes with Apache 2.0.16-dev
 
+  *) Fix segfaults for configuration file syntax errors such as
+     "<Directory>" followed by "</Directory" and
+     "<Directory>" followed by "</Directoryz>".  [Jeff Trawick]
+
   *) Cleanup the --enable-layout option of configure.  This makes
      us use a consistent location for the config.layout file, and it
      makes configure more portable.
index a03234a4d6046c57e07e8c782c686fbe7b83307c..1bddede0cd994e55e338f1910246bf5a871ee3b6 100644 (file)
@@ -864,12 +864,14 @@ static const char * ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool,
            char *bracket = cmd_name + strlen(cmd_name) - 1;
 
            if (*bracket != '>') {
+                parms->err_directive = newdir;
                return apr_pstrcat(p, cmd_name,
                                  "> directive missing closing '>'", NULL);
            }
            *bracket = '\0';
            if (strcasecmp(cmd_name + 2,
                            (*curr_parent)->directive + 1) != 0) {
+                parms->err_directive = newdir;
                return apr_pstrcat(p, "Expected </",
                                  (*curr_parent)->directive + 1, "> but saw ",
                                  cmd_name, ">", NULL);