diff options
| author | Endi S. Dewata <edewata@redhat.com> | 2010-07-12 23:09:16 -0500 |
|---|---|---|
| committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-19 13:06:18 -0700 |
| commit | 684a89d7c5dee09427e11e349e52c0f42b5745aa (patch) | |
| tree | 93caee0322c613779f840b0f2ec1b61d70b1d658 /ldap/servers/plugins/replication | |
| parent | 0db028fd9d116eb913289b6fefcab56c7a38dab6 (diff) | |
| download | ds-684a89d7c5dee09427e11e349e52c0f42b5745aa.tar.gz ds-684a89d7c5dee09427e11e349e52c0f42b5745aa.tar.xz ds-684a89d7c5dee09427e11e349e52c0f42b5745aa.zip | |
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
https://bugzilla.redhat.com/show_bug.cgi?id=614511
Resolves: bug 614511
Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
description: Catch possible NULL pointer in _cl5PositionCursorForReplay().
Diffstat (limited to 'ldap/servers/plugins/replication')
| -rw-r--r-- | ldap/servers/plugins/replication/cl5_api.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c index 6aec7b25..8b79887c 100644 --- a/ldap/servers/plugins/replication/cl5_api.c +++ b/ldap/servers/plugins/replication/cl5_api.c @@ -5860,23 +5860,28 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum { /* use the supplier min csn for the buffer start csn - we know this csn is in our changelog */ - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, - "%s: CSN %s not found and no purging, probably a reinit\n", - agmt_name, csnStr); if ((RUV_SUCCESS == ruv_get_min_csn(supplierRuv, &startCSN)) && startCSN) { /* must now free startCSN */ csn_as_string(startCSN, PR_FALSE, csnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, + "%s: CSN %s not found and no purging, probably a reinit\n", + agmt_name, csnStr); + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: Will try to use supplier min CSN %s to load changelog\n", agmt_name, csnStr); rc = clcache_load_buffer (clcache, startCSN, DB_SET); } else { - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, + slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, + "%s: CSN %s not found and no purging, probably a reinit\n", + agmt_name, csnStr); + slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "%s: Could not get the min csn from the supplier RUV\n", agmt_name); + rc = CL5_RUV_ERROR; + goto done; } } |
