summaryrefslogtreecommitdiff
path: root/builtin/merge-file.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-09-28 19:16:54 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-09-28 19:16:54 -0700
commit3adc4ec7b9e1d2118501728a75a5b93d971974fa (patch)
tree807d65746060e9967d6d016b230730ef5fd24334 /builtin/merge-file.c
parentGit 2.6 (diff)
parentGit 2.5.4 (diff)
downloadtgif-3adc4ec7b9e1d2118501728a75a5b93d971974fa.tar.xz
Sync with v2.5.4
Diffstat (limited to 'builtin/merge-file.c')
-rw-r--r--builtin/merge-file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/merge-file.c b/builtin/merge-file.c
index ea8093f676..50d0bc873b 100644
--- a/builtin/merge-file.c
+++ b/builtin/merge-file.c
@@ -75,7 +75,8 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
names[i] = argv[i];
if (read_mmfile(mmfs + i, fname))
return -1;
- if (buffer_is_binary(mmfs[i].ptr, mmfs[i].size))
+ if (mmfs[i].size > MAX_XDIFF_SIZE ||
+ buffer_is_binary(mmfs[i].ptr, mmfs[i].size))
return error("Cannot merge binary files: %s",
argv[i]);
}