ldap/servers/plugins/replication/repl5_agmt.c | 2 +-
ldap/servers/plugins/replication/repl5_protocol_util.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 634250f788effc843846e725fe38f4c475984319
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Apr 11 10:26:35 2014 -0600
Ticket #47772 empty modify returns LDAP_INVALID_DN_SYNTAX
https://fedorahosted.org/389/ticket/47772
Reviewed by: tbordaz, mreynolds (Thanks!)
Branch: master
Fix Description: tbordaz pointed out a couple of other places where the
pblock modify_mods structure is being referenced directly, and needs to be
checked for NULL.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
diff --git a/ldap/servers/plugins/replication/repl5_agmt.c
b/ldap/servers/plugins/replication/repl5_agmt.c
index 139c8a3..9d617e7 100644
--- a/ldap/servers/plugins/replication/repl5_agmt.c
+++ b/ldap/servers/plugins/replication/repl5_agmt.c
@@ -2780,7 +2780,7 @@ agmt_update_maxcsn(Replica *r, Slapi_DN *sdn, int op, LDAPMod
**mods, CSN *csn)
if(op == SLAPI_OPERATION_MODIFY)
{
slapi_rwlock_rdlock(agmt->attr_lock);
- for ( excluded_count = 0, mod_count = 0; NULL != mods[ mod_count ];
mod_count++){
+ for ( excluded_count = 0, mod_count = 0; mods && (NULL != mods[
mod_count ]); mod_count++){
if(charray_inlist(agmt->frac_attrs, mods[mod_count]->mod_type)){
excluded_count++;
} else if(charray_inlist(agmt->attrs_to_strip,
mods[mod_count]->mod_type)){
diff --git a/ldap/servers/plugins/replication/repl5_protocol_util.c
b/ldap/servers/plugins/replication/repl5_protocol_util.c
index 82af970..893839d 100644
--- a/ldap/servers/plugins/replication/repl5_protocol_util.c
+++ b/ldap/servers/plugins/replication/repl5_protocol_util.c
@@ -695,6 +695,10 @@ repl5_strip_fractional_mods(Repl_Agmt *agmt, LDAPMod ** mods)
int strip = 1;
int i, j, k;
+ if (mods == NULL) {
+ return retval;
+ }
+
if (a) {
/* Iterate through the fractional attr list */
for ( i = 0; a[i] != NULL; i++ )