]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix a bug in #if and #elif whereby mod_include would not
authorCliff Woolley <jwoolley@apache.org>
Thu, 21 Mar 2002 06:13:21 +0000 (06:13 +0000)
committerCliff Woolley <jwoolley@apache.org>
Thu, 21 Mar 2002 06:13:21 +0000 (06:13 +0000)
notice premature EOF's while looking for the "expr=" tag.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@94079 13f79535-47bb-0310-9956-ffa450edef68

src/modules/standard/mod_include.c

index 45bf2f9c8794497da441c54dd849ce18c004dbe4..0c6ef083d614371f9e6b7be8029aea7213b9fd39 100644 (file)
@@ -1959,7 +1959,7 @@ static int handle_if(FILE *in, request_rec *r, const char *error,
     expr = NULL;
     while (1) {
         tag_val = get_tag(r->pool, in, tag, sizeof(tag), 0);
-        if (*tag == '\0') {
+        if (!tag_val || *tag == '\0') {
             return 1;
         }
         else if (!strcmp(tag, "done")) {
@@ -2002,7 +2002,7 @@ static int handle_elif(FILE *in, request_rec *r, const char *error,
     expr = NULL;
     while (1) {
         tag_val = get_tag(r->pool, in, tag, sizeof(tag), 0);
-        if (*tag == '\0') {
+        if (!tag_val || *tag == '\0') {
             return 1;
         }
         else if (!strcmp(tag, "done")) {