summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2010-09-14 11:14:53 -0700
committerNathan Kinder <nkinder@redhat.com>2010-09-15 09:11:05 -0700
commit94b265fb509ac194dec8e51b6d02f7fd88673aac (patch)
tree253f02b232fb52b2bda6caa2240f98442f89991f
parentb28a60185cd54f149e77a1f34ffbfd676f5f2342 (diff)
downloadds-94b265fb509ac194dec8e51b6d02f7fd88673aac.tar.gz
ds-94b265fb509ac194dec8e51b6d02f7fd88673aac.tar.xz
ds-94b265fb509ac194dec8e51b6d02f7fd88673aac.zip
Bug 630097 - (cov#15462) NULL dereference in mep_modrdn_post_op()
If we fail to fetch the postop entry for a modrdn operation in the Managed Entry Plug-in, we end up passing a NULL pointer to slapi_entry_attr_get_charptr(). This function dereferences the entry without checking if it is NULL first. The mep_modrdn_post_op() function should just return if we are unable to fetch the postop entry. I believe that this issue could trigger a crash when chain-on-update is configured and a modrdn operation is chained. There is no postop entry in this case.
-rw-r--r--ldap/servers/plugins/mep/mep.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index 716b39b0..c0ce0139 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -2021,6 +2021,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Error "
"retrieving post-op entry\n");
+ return 0;
}
if ((old_dn = mep_get_dn(pb))) {