else if (detect_rename == DIFF_DETECT_COPY)
register_rename_src(p->one, 1);
}
- if (rename_dst_nr == 0 ||
+ if (rename_dst_nr == 0 || rename_src_nr == 0 ||
(0 < rename_limit && rename_limit < rename_dst_nr))
goto cleanup; /* nothing to do */
if (rename_count == rename_dst_nr)
goto cleanup;
+ if (minimum_score == MAX_SCORE)
+ goto cleanup;
+
num_create = (rename_dst_nr - rename_count);
num_src = rename_src_nr;
mx = xmalloc(sizeof(*mx) * num_create * num_src);