Blame SOURCES/0091-Ticket-408-create-a-normalized-dn-cache.patch

cc3dff
From 515c57545df1958f90571461e6a1109e5c40522d Mon Sep 17 00:00:00 2001
cc3dff
From: Noriko Hosoi <nhosoi@redhat.com>
cc3dff
Date: Tue, 25 Feb 2014 14:33:48 -0800
cc3dff
Subject: [PATCH 91/92] Ticket 408 - create a normalized dn cache
cc3dff
cc3dff
covscan Defect type: FORWARD_NULL
cc3dff
15. 389-ds-base-1.3.1.6/ldap/servers/slapd/dn.c:3036:var_deref_op -
cc3dff
    Dereferencing null pointer "node".
cc3dff
Introduced by commit 1d6dd39fb8b0ef8eb42ec9ef8c3d325e27a3d3c1
cc3dff
Fix: Check if "node" is null or not before referencing.
cc3dff
cc3dff
Reviewed by rmeggins@redhat.com (Thank you, Rich!!)
cc3dff
(cherry picked from commit 5ac08038a05877b4240755801debd5e5a3a94c6f)
cc3dff
(cherry picked from commit 977c1b293beb0e8324a99614705ba316d46352f8)
cc3dff
(cherry picked from commit 056d390f9ee97f02447ae802deb388ec41bf6925)
cc3dff
---
cc3dff
 ldap/servers/slapd/dn.c | 2 +-
cc3dff
 1 file changed, 1 insertion(+), 1 deletion(-)
cc3dff
cc3dff
diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c
cc3dff
index 1eab631..4a11a18 100644
cc3dff
--- a/ldap/servers/slapd/dn.c
cc3dff
+++ b/ldap/servers/slapd/dn.c
cc3dff
@@ -3003,7 +3003,7 @@ ndn_cache_flush()
cc3dff
     int i;
cc3dff
 
cc3dff
     node = ndn_cache->tail;
cc3dff
-    for(i = 0; i < NDN_FLUSH_COUNT && ndn_cache->cache_count > NDN_MIN_COUNT; i++){
cc3dff
+    for(i = 0; node && i < NDN_FLUSH_COUNT && ndn_cache->cache_count > NDN_MIN_COUNT; i++){
cc3dff
         flush_node = node;
cc3dff
         /* update the lru */
cc3dff
         next = node->prev;
cc3dff
-- 
cc3dff
1.8.1.4
cc3dff