You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/10/08 09:41:50 UTC
svn commit: r1180329 - in /httpd/httpd/trunk/modules:
cache/mod_socache_shmcb.c ssl/ssl_engine_init.c
Author: sf
Date: Sat Oct 8 07:41:50 2011
New Revision: 1180329
URL: http://svn.apache.org/viewvc?rev=1180329&view=rev
Log:
Fix a potential NULL pointer dereference found by clang.
Add a AP_DEBUG_ASSERT to quiet a clang false positive.
Modified:
httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c
httpd/httpd/trunk/modules/ssl/ssl_engine_init.c
Modified: httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c?rev=1180329&r1=1180328&r2=1180329&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c Sat Oct 8 07:41:50 2011
@@ -566,6 +566,7 @@ static void socache_shmcb_status(ap_soca
double expiry_total = 0;
int index_pct, cache_pct;
+ AP_DEBUG_ASSERT(header->subcache_num > 0);
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "inside shmcb_status");
/* Perform the iteration inside the mutex to avoid corruption or invalid
* pointer arithmetic. The rest of our logic uses read-only header data so
Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_init.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_init.c?rev=1180329&r1=1180328&r2=1180329&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_init.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_init.c Sat Oct 8 07:41:50 2011
@@ -257,7 +257,7 @@ int ssl_init_Module(apr_pool_t *p, apr_p
sc->session_cache_timeout = SSL_SESSION_CACHE_TIMEOUT;
}
- if (sc->server->pphrase_dialog_type == SSL_PPTYPE_UNSET) {
+ if (sc->server && sc->server->pphrase_dialog_type == SSL_PPTYPE_UNSET) {
sc->server->pphrase_dialog_type = SSL_PPTYPE_BUILTIN;
}