You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2018/03/24 12:15:29 UTC

[Bug 57525] mod_macro use-after-clear bug

https://bz.apache.org/bugzilla/show_bug.cgi?id=57525

--- Comment #10 from Christophe JAILLET <ch...@wanadoo.fr> ---
(In reply to Jose Kahan from comment #9)

> One question. Would doing the following ap_assert be overkill in the lazy
> initialization?
> 
> else {
>  ap_assert(ap_macros != NULL)
>  pool = apr_hash_pool_get(ap_macros);
> }

Code is 
    if (ap_macros == NULL) {
        pool = cmd->pool;
        ap_macros = apr_hash_make(pool);
        ap_assert(ap_macros != NULL);
        apr_pool_cleanup_register(pool, &ap_macros,
                                  ap_pool_cleanup_set_null,
                                  apr_pool_cleanup_null);
    }
    else {
        pool = apr_hash_pool_get(ap_macros);
    }

Clearly, 'ap_macros' can't be NULL at this point.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org