mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Fix a potential NULL pointer dereference found by clang.
Add a AP_DEBUG_ASSERT to quiet a clang false positive. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180329 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1
modules/cache/mod_socache_shmcb.c
vendored
1
modules/cache/mod_socache_shmcb.c
vendored
@@ -566,6 +566,7 @@ static void socache_shmcb_status(ap_socache_instance_t *ctx,
|
|||||||
double expiry_total = 0;
|
double expiry_total = 0;
|
||||||
int index_pct, cache_pct;
|
int index_pct, cache_pct;
|
||||||
|
|
||||||
|
AP_DEBUG_ASSERT(header->subcache_num > 0);
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "inside shmcb_status");
|
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "inside shmcb_status");
|
||||||
/* Perform the iteration inside the mutex to avoid corruption or invalid
|
/* Perform the iteration inside the mutex to avoid corruption or invalid
|
||||||
* pointer arithmetic. The rest of our logic uses read-only header data so
|
* pointer arithmetic. The rest of our logic uses read-only header data so
|
||||||
|
@@ -257,7 +257,7 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
|
|||||||
sc->session_cache_timeout = SSL_SESSION_CACHE_TIMEOUT;
|
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;
|
sc->server->pphrase_dialog_type = SSL_PPTYPE_BUILTIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user