diff options
author | Stefan Fritsch <sf@apache.org> | 2011-11-19 22:58:48 +0100 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-11-19 22:58:48 +0100 |
commit | 92663b1e32722d89c3255920625329f58b3cdb78 (patch) | |
tree | d21f70945d7827f9adeabbdd696e2666f14dc6e4 /include/ap_expr.h | |
parent | Update. (diff) | |
download | apache2-92663b1e32722d89c3255920625329f58b3cdb78.tar.xz apache2-92663b1e32722d89c3255920625329f58b3cdb78.zip |
Limit recursion in ap_expr evaluation to avoid unbounded stack usage
* evaluate chains of ||, &&, and string concatenation non-recursively
* limit other types of recursion to 20 levels
* avoid some string copies if concatenating more than 2 strings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204087 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/ap_expr.h')
-rw-r--r-- | include/ap_expr.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ap_expr.h b/include/ap_expr.h index 409c7acd4c..6d6506035a 100644 --- a/include/ap_expr.h +++ b/include/ap_expr.h @@ -130,6 +130,8 @@ typedef struct { const char **result_string; /** Arbitrary context data provided by the caller for custom functions */ void *data; + /** The current recursion level */ + int reclvl; } ap_expr_eval_ctx_t; /** |