Browse Source

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.
Nathan Kinder 15 years ago
parent
commit
94b265fb50
1 changed files with 1 additions and 0 deletions
  1. 1 0
      ldap/servers/plugins/mep/mep.c

+ 1 - 0
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))) {