diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-31 17:42:17 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-31 17:42:17 -0800 |
commit | 6ac92294b30d7c8619cf15b531448f011dbdcdcc (patch) | |
tree | 43c48771b1ddef478d944cd0af7d257607515568 /unpack-trees.c | |
parent | b296e8fce6de6a40a41b5168dfbe735d11255256 (diff) | |
parent | c7cddc1a2f365e4f4aea71b700c0b833eb436fee (diff) | |
download | git-6ac92294b30d7c8619cf15b531448f011dbdcdcc.tar.gz |
Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
merge: fix out-of-bounds memory access
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index 15c9ef592b..3a4e181af4 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -240,8 +240,11 @@ static struct cache_entry *create_ce_entry(const struct traverse_info *info, con return ce; } -static int unpack_nondirectories(int n, unsigned long mask, unsigned long dirmask, struct cache_entry *src[5], - const struct name_entry *names, const struct traverse_info *info) +static int unpack_nondirectories(int n, unsigned long mask, + unsigned long dirmask, + struct cache_entry **src, + const struct name_entry *names, + const struct traverse_info *info) { int i; struct unpack_trees_options *o = info->data; @@ -291,7 +294,7 @@ static int unpack_nondirectories(int n, unsigned long mask, unsigned long dirmas static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, struct name_entry *names, struct traverse_info *info) { - struct cache_entry *src[5] = { NULL, }; + struct cache_entry *src[MAX_UNPACK_TREES + 1] = { NULL, }; struct unpack_trees_options *o = info->data; const struct name_entry *p = names; |