[389-commits] ldap/servers

Mark Reynolds mreynolds at fedoraproject.org
Tue Dec 17 18:25:02 UTC 2013


 ldap/servers/plugins/replication/repl5_agmtlist.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 8baed897f504e75478b5dbbe736c1eaf6d2d7fa9
Author: Mark Reynolds <mreynolds at redhat.com>
Date:   Tue Dec 17 13:11:03 2013 -0500

    Ticket 47620 - Fix dereferenced NULL pointer in agmtlist_modify_callback()
    
    The server would dereference a NULL point if an attribute was deleted from a replication
    agreement.
    
    https://fedorahosted.org/389/ticket/47620
    
    Reviewed by: rmeggins(Thanks!)

diff --git a/ldap/servers/plugins/replication/repl5_agmtlist.c b/ldap/servers/plugins/replication/repl5_agmtlist.c
index 59eb84f..e75ff24 100644
--- a/ldap/servers/plugins/replication/repl5_agmtlist.c
+++ b/ldap/servers/plugins/replication/repl5_agmtlist.c
@@ -245,7 +245,9 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Slapi_Entry
 	for (i = 0; NULL != mods && NULL != mods[i]; i++)
 	{
 		slapi_ch_free_string(&val);
-		val = slapi_berval_get_string_copy (mods[i]->mod_bvalues[0]);
+		if (mods[i]->mod_bvalues && mods[i]->mod_bvalues[0])
+			val = slapi_berval_get_string_copy (mods[i]->mod_bvalues[0]);
+		}
 		if (slapi_attr_types_equivalent(mods[i]->mod_type, type_nsds5ReplicaInitialize))
 		{
             /* we don't allow delete attribute operations unless it was issued by




More information about the 389-commits mailing list