summaryrefslogtreecommitdiff
path: root/modules/metadata
diff options
context:
space:
mode:
authorAndré Malo <nd@apache.org>2004-04-10 13:57:39 +0000
committerAndré Malo <nd@apache.org>2004-04-10 13:57:39 +0000
commitc7031febd34fe5f032e36ce3542f8b4aa900e3a9 (patch)
tree135cab829ae3393b8bf2cc75c7ef782ff4c78aa5 /modules/metadata
parentae295b155554496e235c3310f23909917bd54318 (diff)
downloadhttpd-c7031febd34fe5f032e36ce3542f8b4aa900e3a9.tar.gz
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')
-rw-r--r--modules/metadata/mod_setenvif.c9
-rw-r--r--modules/metadata/mod_usertrack.c1
2 files changed, 6 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;
}
diff --git a/modules/metadata/mod_usertrack.c b/modules/metadata/mod_usertrack.c
index 9c00a9a1d0..a707617997 100644
--- a/modules/metadata/mod_usertrack.c
+++ b/modules/metadata/mod_usertrack.c
@@ -200,6 +200,7 @@ static void set_and_comp_regexp(cookie_dir_rec *dcfg,
"=([^;,]+)", NULL);
dcfg->regexp = ap_pregcomp(p, dcfg->regexp_string, REG_EXTENDED);
+ ap_assert(dcfg->regexp != NULL);
}
static int spot_cookie(request_rec *r)