Commit 17302fdb authored by Jeff Trawick's avatar Jeff Trawick
Browse files

Fix segfaults for configuration file syntax errors such as

"<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
parent 02e9a1f6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
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.
+2 −0
Original line number Diff line number Diff line
@@ -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);