浏览代码

Bug 197886 - Initialize return value for UUID generation code

The previous patch for bug 197886 had a bug in it where the return
value of import_generate_uniqueid() is not initialized.  If this
function is called when a UUID is not needed, the return value is
garbage.  This causes the bulk import code on a replica that is
being initialized to abort if garbage is returned.
Nathan Kinder 15 年之前
父节点
当前提交
cf96e0ae14
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ldap/servers/slapd/back-ldbm/import-threads.c

+ 1 - 1
ldap/servers/slapd/back-ldbm/import-threads.c

@@ -80,7 +80,7 @@ static void import_decref_entry(struct backentry *ep)
 static int import_generate_uniqueid(ImportJob *job, Slapi_Entry *e)
 {
     const char *uniqueid = slapi_entry_get_uniqueid(e);
-    int rc;
+    int rc = UID_SUCCESS;
 
     if (!uniqueid && (job->uuid_gen_type != SLAPI_UNIQUEID_GENERATE_NONE)) {
         char *newuniqueid;