httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1695170 - in /httpd/httpd/trunk: docs/log-message-tags/next-number modules/mappers/mod_rewrite.c
Date Mon, 10 Aug 2015 21:31:05 GMT
Author: jailletc36
Date: Mon Aug 10 21:31:05 2015
New Revision: 1695170

URL: http://svn.apache.org/r1695170
Log:
Avoid a crash when lacking correct DB access permissions. PR 57868.

Modified:
    httpd/httpd/trunk/docs/log-message-tags/next-number
    httpd/httpd/trunk/modules/mappers/mod_rewrite.c

Modified: httpd/httpd/trunk/docs/log-message-tags/next-number
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1695170&r1=1695169&r2=1695170&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/log-message-tags/next-number (original)
+++ httpd/httpd/trunk/docs/log-message-tags/next-number Mon Aug 10 21:31:05 2015
@@ -1 +1 @@
-2963
+2964

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=1695170&r1=1695169&r2=1695170&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Mon Aug 10 21:31:05 2015
@@ -1370,6 +1370,13 @@ static char *lookup_map_dbd(request_rec
     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);
 



Mime
View raw message