Merge pull request #4761 from pks-t/pks/aix-diff-oom diff: fix OOM on AIX when finding similar deltas in empty diff
diff --git a/src/diff_tform.c b/src/diff_tform.c
index 7133065..42da150 100644
--- a/src/diff_tform.c
+++ b/src/diff_tform.c
@@ -822,7 +822,7 @@ int git_diff_find_similar(
num_deltas = diff->deltas.length;
/* TODO: maybe abort if deltas.length > rename_limit ??? */
- if (!git__is_uint32(num_deltas))
+ if (!num_deltas || !git__is_uint32(num_deltas))
goto cleanup;
/* No flags set; nothing to do */