ldap/servers/slapd/control.c | 4 ++--
ldap/servers/slapd/dn.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 86b76ef2466659efd31b07bc02b02daf444a9cde
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Feb 25 15:09:34 2014 -0800
Ticket 571 (dup 47361) - Empty control list causes LDAP protocol error is thrown
covscan Defect type: Compiler Warnings
2. 389-ds-base-1.3.1.6/ldap/servers/slapd/control.c:364:25:
warning - format '%d' expects argument of type 'int',
but argument 4 has type 'PRUint64' [-Wformat=]
Introduced by commit d695afb6a637432e880296d8552f466981c0796c
Fix: Replaced %d with % NSPRIu64
Reviewed by rmeggins(a)redhat.com (Thank you, Rich!!)
(cherry picked from commit 383db4a27cc417c1708989d84cf0e4445936ae9f)
(cherry picked from commit 8b92149bf229d12052a2f349611e5f639fc57ef8)
diff --git a/ldap/servers/slapd/control.c b/ldap/servers/slapd/control.c
index e7b7562..1229e9f 100644
--- a/ldap/servers/slapd/control.c
+++ b/ldap/servers/slapd/control.c
@@ -360,8 +360,8 @@ get_ldapmessage_controls_ext(
slapi_pblock_set(pb, SLAPI_REQCONTROLS, NULL);
slapi_pblock_set(pb, SLAPI_MANAGEDSAIT, &ctrl_not_found);
slapi_pblock_set(pb, SLAPI_PWPOLICY, &ctrl_not_found);
- slapi_log_error(SLAPI_LOG_CONNS, "connection", "Warning: conn=%d op=%d contains an empty list of controls\n",
- (int)pb->pb_conn->c_connid, pb->pb_op->o_opid);
+ slapi_log_error(SLAPI_LOG_CONNS, "connection", "Warning: conn=%" NSPRIu64 " op=%d contains an empty list of controls\n",
+ (long long unsigned int)pb->pb_conn->c_connid, pb->pb_op->o_opid);
} else {
if ((tag != LBER_END_OF_SEQORSET) && (len != -1)) {
goto free_and_return;
commit 056d390f9ee97f02447ae802deb388ec41bf6925
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Feb 25 14:33:48 2014 -0800
Ticket 408 - create a normalized dn cache
covscan Defect type: FORWARD_NULL
15. 389-ds-base-1.3.1.6/ldap/servers/slapd/dn.c:3036:var_deref_op -
Dereferencing null pointer "node".
Introduced by commit 1d6dd39fb8b0ef8eb42ec9ef8c3d325e27a3d3c1
Fix: Check if "node" is null or not before referencing.
Reviewed by rmeggins(a)redhat.com (Thank you, Rich!!)
(cherry picked from commit 5ac08038a05877b4240755801debd5e5a3a94c6f)
(cherry picked from commit 977c1b293beb0e8324a99614705ba316d46352f8)
diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c
index e48275e..dcfe71c 100644
--- a/ldap/servers/slapd/dn.c
+++ b/ldap/servers/slapd/dn.c
@@ -3007,7 +3007,7 @@ ndn_cache_flush()
int i;
node = ndn_cache->tail;
- for(i = 0; i < NDN_FLUSH_COUNT && ndn_cache->cache_count > NDN_MIN_COUNT; i++){
+ for(i = 0; node && i < NDN_FLUSH_COUNT && ndn_cache->cache_count > NDN_MIN_COUNT; i++){
flush_node = node;
/* update the lru */
next = node->prev;