diff options
author | André Malo <nd@apache.org> | 2004-04-10 15:57:39 +0200 |
---|---|---|
committer | André Malo <nd@apache.org> | 2004-04-10 15:57:39 +0200 |
commit | c7031febd34fe5f032e36ce3542f8b4aa900e3a9 (patch) | |
tree | 135cab829ae3393b8bf2cc75c7ef782ff4c78aa5 /modules/metadata/mod_setenvif.c | |
parent | escape the cookie_name before pasting into the regexp. (diff) | |
download | apache2-c7031febd34fe5f032e36ce3542f8b4aa900e3a9.tar.xz apache2-c7031febd34fe5f032e36ce3542f8b4aa900e3a9.zip |
Fix a bunch of cases where the return code of the regex compiler
was not checked properly. This affects: mod_setenvif, mod_usertrack,
mod_proxy, mod_proxy_ftp and core.
PR: 28218
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103328 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/metadata/mod_setenvif.c')
-rw-r--r-- | modules/metadata/mod_setenvif.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c index 78eb5c76d6..bf2e0ec02e 100644 --- a/modules/metadata/mod_setenvif.c +++ b/modules/metadata/mod_setenvif.c @@ -172,11 +172,12 @@ static int is_header_regex(apr_pool_t *p, const char* name) */ regex_t *preg = ap_pregcomp(p, "^[-A-Za-z0-9_]*$", (REG_EXTENDED | REG_NOSUB )); - if (preg) { - if (ap_regexec(preg, name, 0, NULL, 0)) { - return 1; - } + ap_assert(preg != NULL); + + if (ap_regexec(preg, name, 0, NULL, 0)) { + return 1; } + return 0; } |