You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2004/09/13 12:59:56 UTC
cvs commit: httpd-2.0/modules/ldap util_ldap.c util_ldap_cache.c util_ldap_cache_mgr.c
jorton 2004/09/13 03:59:56
Modified: modules/ldap util_ldap.c util_ldap_cache.c
util_ldap_cache_mgr.c
Log:
* 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.
Revision Changes Path
1.12 +2 -2 httpd-2.0/modules/ldap/util_ldap.c
Index: util_ldap.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ldap/util_ldap.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -d -w -u -r1.11 -r1.12
--- util_ldap.c 26 Aug 2004 16:46:55 -0000 1.11
+++ util_ldap.c 13 Sep 2004 10:59:55 -0000 1.12
@@ -1223,7 +1223,7 @@
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 @@
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.9 +1 -0 httpd-2.0/modules/ldap/util_ldap_cache.c
Index: util_ldap_cache.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ldap/util_ldap_cache.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -d -w -u -r1.8 -r1.9
--- util_ldap_cache.c 18 Aug 2004 22:18:39 -0000 1.8
+++ util_ldap_cache.c 13 Sep 2004 10:59:55 -0000 1.9
@@ -99,6 +99,7 @@
type_str = "Compares";
break;
case 2:
+ default:
cache_node = node->dn_compare_cache;
type_str = "DN Compares";
break;
1.7 +1 -1 httpd-2.0/modules/ldap/util_ldap_cache_mgr.c
Index: util_ldap_cache_mgr.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ldap/util_ldap_cache_mgr.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -d -w -u -r1.6 -r1.7
--- util_ldap_cache_mgr.c 18 Aug 2004 22:18:39 -0000 1.6
+++ util_ldap_cache_mgr.c 13 Sep 2004 10:59:55 -0000 1.7
@@ -212,7 +212,7 @@
*/
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;