Commit 3ce4ad96 authored by Joe Orton's avatar Joe Orton
Browse files

* modules/ldap/util_ldap.c (util_ldap_post_config): Fix false

positives from gcc -Wformat-security.

* modules/ldap/util_ldap_cache.c (util_ldap_url_node_display): Add default
to switch to avoid uninitialised variable warnings.

* modules/ldap/util_ldap_cache_mgr.c (util_ald_create_caches): Fix to
return NULL rather than random chunk from stack on error path.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105105 13f79535-47bb-0310-9956-ffa450edef68
parent a12a6aaa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1223,7 +1223,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
        apr_ldap_err_t *result = NULL;
        apr_ldap_info(p, &(result));
        if (result != NULL) {
            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, result->reason);
            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, "%s", result->reason);
        }
    }

@@ -1244,7 +1244,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
            st->ssl_support = 1;
        }
        else if (NULL != result) {
            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, result->reason);
            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "%s", result->reason);
            st->ssl_support = 0;
        }

+1 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ void util_ldap_url_node_display(request_rec *r, util_ald_cache_t *cache, void *n
                type_str = "Compares";
                break;
            case 2:
            default:
                cache_node = node->dn_compare_cache;
                type_str = "DN Compares";
                break;
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ void util_ald_cache_purge(util_ald_cache_t *cache)
 */
util_url_node_t *util_ald_create_caches(util_ldap_state_t *st, const char *url)
{
    util_url_node_t curl, *newcurl;
    util_url_node_t curl, *newcurl = NULL;
    util_ald_cache_t *search_cache;
    util_ald_cache_t *compare_cache;
    util_ald_cache_t *dn_compare_cache;