andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 6 months ago
Clone
dc8c34
From f32980b436e1844a9f6045b8f432bc38cb75744c Mon Sep 17 00:00:00 2001
dc8c34
From: Mark Reynolds <mreynolds@redhat.com>
dc8c34
Date: Wed, 20 Feb 2013 13:37:22 -0500
dc8c34
Subject: [PATCH] Ticket 590 - ns-slapd segfaults while trying to delete a
dc8c34
 tombstone entry
dc8c34
dc8c34
Bug Description:  While trying to remove a tombstone entry, ns-slapd
dc8c34
                  crashed with segfault.
dc8c34
dc8c34
Fix Description:  Check if op_parms->csn is NULL before dereferencing.
dc8c34
                  This was fixed in master via ticket 532, but this
dc8c34
                  patch is just part of that fix to avoid the crash.
dc8c34
dc8c34
https://fedorahosted.org/389/ticket/590
dc8c34
dc8c34
Reviewed by: Noriko(Thanks!)
dc8c34
(cherry picked from commit 39f19ae08afe28eb36eabe76b2add1e84c7ed805)
dc8c34
---
dc8c34
 ldap/servers/plugins/replication/repl5_plugins.c |    2 +-
dc8c34
 1 files changed, 1 insertions(+), 1 deletions(-)
dc8c34
dc8c34
diff --git a/ldap/servers/plugins/replication/repl5_plugins.c b/ldap/servers/plugins/replication/repl5_plugins.c
dc8c34
index f7677dd..e3c3083 100644
dc8c34
--- a/ldap/servers/plugins/replication/repl5_plugins.c
dc8c34
+++ b/ldap/servers/plugins/replication/repl5_plugins.c
dc8c34
@@ -1064,7 +1064,7 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
dc8c34
 			op_params->target_address.uniqueid = slapi_ch_strdup (uniqueid);
dc8c34
 		} 
dc8c34
 
dc8c34
-		if( is_cleaned_rid(csn_get_replicaid(op_params->csn))){
dc8c34
+		if( op_params->csn && is_cleaned_rid(csn_get_replicaid(op_params->csn))){
dc8c34
 			/* this RID has been cleaned */
dc8c34
 			object_release (repl_obj);
dc8c34
 			return 0;
dc8c34
-- 
dc8c34
1.7.7.6
dc8c34