summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/replication
diff options
context:
space:
mode:
Diffstat (limited to 'ldap/servers/plugins/replication')
-rw-r--r--ldap/servers/plugins/replication/repl5_total.c2
-rw-r--r--ldap/servers/plugins/replication/repl_controls.c2
-rw-r--r--ldap/servers/plugins/replication/repl_extop.c6
-rw-r--r--ldap/servers/plugins/replication/windows_private.c6
4 files changed, 11 insertions, 5 deletions
diff --git a/ldap/servers/plugins/replication/repl5_total.c b/ldap/servers/plugins/replication/repl5_total.c
index d2987cdb..99ba838a 100644
--- a/ldap/servers/plugins/replication/repl5_total.c
+++ b/ldap/servers/plugins/replication/repl5_total.c
@@ -729,7 +729,7 @@ decode_total_update_extop(Slapi_PBlock *pb, Slapi_Entry **ep)
if (NULL == extop_oid ||
((strcmp(extop_oid, REPL_NSDS50_REPLICATION_ENTRY_REQUEST_OID) != 0) &&
(strcmp(extop_oid, REPL_NSDS71_REPLICATION_ENTRY_REQUEST_OID) != 0)) ||
- NULL == extop_value)
+ NULL == extop_value || NULL == extop_value->bv_val)
{
/* Bogus */
goto loser;
diff --git a/ldap/servers/plugins/replication/repl_controls.c b/ldap/servers/plugins/replication/repl_controls.c
index cfd980fd..980bdd89 100644
--- a/ldap/servers/plugins/replication/repl_controls.c
+++ b/ldap/servers/plugins/replication/repl_controls.c
@@ -216,7 +216,7 @@ decode_NSDS50ReplUpdateInfoControl(LDAPControl **controlsp,
if (slapi_control_present(controlsp, REPL_NSDS50_UPDATE_INFO_CONTROL_OID,
&ctl_value, &iscritical))
{
- if ((tmp_bere = ber_init(ctl_value)) == NULL)
+ if ((ctl_value->bv_val == NULL) || (tmp_bere = ber_init(ctl_value)) == NULL)
{
rc = -1;
goto loser;
diff --git a/ldap/servers/plugins/replication/repl_extop.c b/ldap/servers/plugins/replication/repl_extop.c
index 527c964e..38af8ab8 100644
--- a/ldap/servers/plugins/replication/repl_extop.c
+++ b/ldap/servers/plugins/replication/repl_extop.c
@@ -342,7 +342,7 @@ decode_startrepl_extop(Slapi_PBlock *pb, char **protocol_oid, char **repl_root,
if (NULL == extop_oid ||
((strcmp(extop_oid, REPL_START_NSDS50_REPLICATION_REQUEST_OID) != 0) &&
(strcmp(extop_oid, REPL_START_NSDS90_REPLICATION_REQUEST_OID) != 0)) ||
- NULL == extop_value)
+ NULL == extop_value || NULL == extop_value->bv_val)
{
/* bogus */
rc = -1;
@@ -478,7 +478,7 @@ decode_endrepl_extop(Slapi_PBlock *pb, char **repl_root)
if (NULL == extop_oid ||
strcmp(extop_oid, REPL_END_NSDS50_REPLICATION_REQUEST_OID) != 0 ||
- NULL == extop_value)
+ NULL == extop_value || NULL == extop_value->bv_val)
{
/* bogus */
rc = -1;
@@ -542,7 +542,7 @@ decode_repl_ext_response(struct berval *bvdata, int *response_code,
PR_ASSERT(NULL != ruv_bervals);
if (NULL == bvdata || NULL == response_code || NULL == ruv_bervals ||
- NULL == data_guid || NULL == data)
+ NULL == data_guid || NULL == data || NULL == bvdata->bv_val)
{
return_value = -1;
}
diff --git a/ldap/servers/plugins/replication/windows_private.c b/ldap/servers/plugins/replication/windows_private.c
index f2bf031e..9ad7681a 100644
--- a/ldap/servers/plugins/replication/windows_private.c
+++ b/ldap/servers/plugins/replication/windows_private.c
@@ -612,6 +612,12 @@ void windows_private_update_dirsync_control(const Repl_Agmt *ra,LDAPControl **co
#endif
goto choke;
}
+ else if (!controls[i-1]->ldctl_value.bv_val) {
+#ifdef FOR_DEBUGGING
+ return_value = LDAP_CONTROL_NOT_FOUND;
+#endif
+ goto choke;
+ }
else
{
dirsync = slapi_dup_control( controls[i-1]);