From: Cliff Woolley Date: Thu, 21 Mar 2002 06:13:21 +0000 (+0000) Subject: Fix a bug in #if and #elif whereby mod_include would not X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2ea8652bc73c8b3d85dda36b1d2154901a23f42;p=thirdparty%2Fapache%2Fhttpd.git Fix a bug in #if and #elif whereby mod_include would not 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 --- diff --git a/src/modules/standard/mod_include.c b/src/modules/standard/mod_include.c index 45bf2f9c879..0c6ef083d61 100644 --- a/src/modules/standard/mod_include.c +++ b/src/modules/standard/mod_include.c @@ -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")) {