From: Jeff Trawick Date: Mon, 2 Apr 2001 17:08:03 +0000 (+0000) Subject: Fix segfaults for configuration file syntax errors such as X-Git-Tag: 2.0.16~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cdef3739387ca0205f4206e7c486dab95ed95f6;p=thirdparty%2Fapache%2Fhttpd.git Fix segfaults for configuration file syntax errors such as "" followed by "" followed by "" git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88649 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 3541018e13b..a82c992817a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.16-dev + *) Fix segfaults for configuration file syntax errors such as + "" followed by "" followed by "". [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. diff --git a/server/config.c b/server/config.c index a03234a4d60..1bddede0cd9 100644 --- a/server/config.c +++ b/server/config.c @@ -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 directive + 1, "> but saw ", cmd_name, ">", NULL);