Commit e7a12918 authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

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
parent 8104f18b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -566,6 +566,7 @@ static void socache_shmcb_status(ap_socache_instance_t *ctx,
    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
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
            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;
        }