1. Stefan Saasen
  2. git

Commits

Junio C Hamano  committed 6ac9229 Merge

Merge branch 'maint-1.6.0' into maint

* maint-1.6.0:
merge: fix out-of-bounds memory access

  • Participants
  • Parent commits b296e8f, c7cddc1
  • Branches master

Comments (0)

Files changed (1)

File unpack-trees.c

View file
 	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;
 
 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;