]> granicus.if.org Git - apache/commitdiff
Fixed a segfault
authorBrian Pane <brianp@apache.org>
Fri, 10 May 2002 13:51:10 +0000 (13:51 +0000)
committerBrian Pane <brianp@apache.org>
Fri, 10 May 2002 13:51:10 +0000 (13:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95030 13f79535-47bb-0310-9956-ffa450edef68

modules/metadata/mod_setenvif.c

index e81039461214682783e9b5cb567119f605daa861..6b18bd4d3d630dfe8e564cae07fa0a008c07162e 100644 (file)
@@ -565,7 +565,7 @@ static int match_headers(request_rec *r)
         }
 
         if ((b->pattern && apr_strmatch(b->pattern, val, val_len)) ||
-            !ap_regexec(b->preg, val, 0, NULL, 0)) {
+            (!b->pattern && !ap_regexec(b->preg, val, 0, NULL, 0))) {
            const apr_array_header_t *arr = apr_table_elts(b->features);
             elts = (const apr_table_entry_t *) arr->elts;