diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-09-28 14:59:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-09-28 14:59:28 -0700 |
commit | 92cdfd21313c5bf5657d4ac2d3e6ae7af7e9ce94 (patch) | |
tree | 1ee5bd8057292fc6dfa9edc58b3c2cc7b990f8ab /ll-merge.c | |
parent | f2df3104ce45bc1ee6d7c16f3a02f1d157c65e07 (diff) | |
parent | 83c4d380171a2ecd24dd2e04072692ec54a7aaa5 (diff) | |
download | git-92cdfd21313c5bf5657d4ac2d3e6ae7af7e9ce94.tar.gz |
Merge branch 'jk/xdiff-memory-limits' into maint-2.3
Diffstat (limited to 'll-merge.c')
-rw-r--r-- | ll-merge.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ll-merge.c b/ll-merge.c index 8ea03e536a..4e789f5330 100644 --- a/ll-merge.c +++ b/ll-merge.c @@ -88,7 +88,10 @@ static int ll_xdl_merge(const struct ll_merge_driver *drv_unused, xmparam_t xmp; assert(opts); - if (buffer_is_binary(orig->ptr, orig->size) || + if (orig->size > MAX_XDIFF_SIZE || + src1->size > MAX_XDIFF_SIZE || + src2->size > MAX_XDIFF_SIZE || + buffer_is_binary(orig->ptr, orig->size) || buffer_is_binary(src1->ptr, src1->size) || buffer_is_binary(src2->ptr, src2->size)) { return ll_binary_merge(drv_unused, result, |