]> granicus.if.org Git - apache/commitdiff
Fix a bug parsing configuration file containers. With a sequence
authorJeff Trawick <trawick@apache.org>
Fri, 15 Sep 2000 16:50:39 +0000 (16:50 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 15 Sep 2000 16:50:39 +0000 (16:50 +0000)
like this in the config file

       <IfModule mod_kilroy.c>
       any stuff
       </IfModule>
       <IfModule mod_lovejoy.c>
       (blank line)
       any stuff
       </IfModule>

the second container would be terminated at the blank line due to
sediment in the buffer from reading the prior </IfModule> and an
error message would be generated for the real </IfModule> for the
second container.  Also due to this problem, any two characters
could be used for "</" in the close of a container.

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

server/config.c

index 43069215a6b8bcfbdc0b9710ead495da97d44e17..bca10832582c5d225e048a02cfbbc13550ab960e 100644 (file)
@@ -989,8 +989,9 @@ const char *ap_build_cont_config(apr_pool_t *p, apr_pool_t *temp_pool,
     ap_directive_t *conftree = NULL;
 
     bracket = apr_pstrcat(p, orig_directive + 1, ">", NULL);
-    while(!(ap_cfg_getline(l, MAX_STRING_LEN, parms->config_file))) {
-        if ((strcasecmp(l + 2, bracket) == 0) &&
+    while (!(ap_cfg_getline(l, MAX_STRING_LEN, parms->config_file))) {
+        if (!memcmp(l, "</", 2) &&
+            (strcasecmp(l + 2, bracket) == 0) &&
             (*curr_parent == NULL)) {
             break;
         }