httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r644105 - /httpd/httpd/trunk/server/util_expr.c
Date Wed, 02 Apr 2008 23:08:23 GMT
Author: niq
Date: Wed Apr  2 16:08:22 2008
New Revision: 644105

URL: http://svn.apache.org/viewvc?rev=644105&view=rev
Log:
Expression evaluation: treat null expression as unconditional, not segfault.

Modified:
    httpd/httpd/trunk/server/util_expr.c

Modified: httpd/httpd/trunk/server/util_expr.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr.c?rev=644105&r1=644104&r2=644105&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr.c (original)
+++ httpd/httpd/trunk/server/util_expr.c Wed Apr  2 16:08:22 2008
@@ -871,7 +871,11 @@
                              int *was_error, backref_t **reptr,
                              string_func_t string_func, opt_func_t eval_func)
 {
-    ap_parse_node_t *clone = ap_expr_clone_tree(r->pool, root, NULL);
+    ap_parse_node_t *clone;
+    if (root == NULL) {  /* no condition == unconditional */
+        return 1;
+    }
+    clone = ap_expr_clone_tree(r->pool, root, NULL);
     return expr_eval(r, clone, was_error, reptr, string_func, eval_func);
 }
 AP_DECLARE(int) ap_expr_evalstring(request_rec *r, const char *expr,



Mime
View raw message