httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject [PATCH] mod_include/1139: parse_expr() evaluates some expressions containing && or || incorrectly
Date Thu, 25 Sep 1997 00:28:58 GMT
The following patch against 1.3 fixes PR#1139.  There's a fix for 1.2.5 in
the bugdb already which is the same except for formatting.  Please vote on
this for both 1.3 and 1.2.5. 

The code which evaluates the left and right trees of && and || doesn't set
the value in the tree ... so you get bogus results using uninitialized
data. 

Dean

Index: mod_include.c
===================================================================
RCS file: /export/home/cvs/apachen/src/modules/standard/mod_include.c,v
retrieving revision 1.54
diff -u -r1.54 mod_include.c
--- mod_include.c	1997/09/19 17:25:10	1.54
+++ mod_include.c	1997/09/25 00:25:59
@@ -1569,6 +1569,7 @@
                     strncpy(current->left->token.value, buffer,
                             MAX_STRING_LEN - 1);
                     current->left->token.value[MAX_STRING_LEN - 1] = '\0';
+		    current->left->value = (current->left->token.value[0] != '\0');
                     current->left->done = 1;
                     break;
                 default:
@@ -1584,6 +1585,7 @@
                     strncpy(current->right->token.value, buffer,
                             MAX_STRING_LEN - 1);
                     current->right->token.value[MAX_STRING_LEN - 1] = '\0';
+		    current->right->value = (current->right->token.value[0] != '\0');
                     current->right->done = 1;
                     break;
                 default:



Mime
View raw message