]> granicus.if.org Git - apache/commitdiff
Avoid a crash when lacking correct DB access permissions. PR 57868.
authorChristophe Jaillet <jailletc36@apache.org>
Mon, 10 Aug 2015 21:31:05 +0000 (21:31 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Mon, 10 Aug 2015 21:31:05 +0000 (21:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1695170 13f79535-47bb-0310-9956-ffa450edef68

docs/log-message-tags/next-number
modules/mappers/mod_rewrite.c

index e75f40a40b51f34fd85433bbfe5759595500d6cf..ff481a2e55352a91075216c01581435185ad9f03 100644 (file)
@@ -1 +1 @@
-2963
+2964
index 3135e5e0c6d7ba21903c4c29d704390a4641d380..b25acdec0dfe5eeffb2883d8873a87fe6069da7c 100644 (file)
@@ -1370,6 +1370,13 @@ static char *lookup_map_dbd(request_rec *r, char *key, const char *label)
     char *ret = NULL;
     int n = 0;
     ap_dbd_t *db = dbd_acquire(r);
+    
+    if (db == NULL) {
+        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02963)
+                      "rewritemap: No db handle available! "
+                      "Check your database access");
+        return NULL;
+   }
 
     stmt = apr_hash_get(db->prepared, label, APR_HASH_KEY_STRING);