diff --git a/submodule.c b/submodule.c
index 4e62900af1c28a37ee44514afe93f398eed591e0..6f1c10722f744f4a27f18dae4867b15ecbf57d49 100644 (file)
--- a/submodule.c
+++ b/submodule.c
if (read_cache() < 0)
die("index file corrupt");
- argv = xcalloc(num_options + 5, sizeof(const char *));
+ /* 4: "fetch" (options) "--submodule-prefix" prefix NULL */
+ argv = xcalloc(num_options + 4, sizeof(const char *));
argv[argc++] = "fetch";
for (i = 0; i < num_options; i++)
argv[argc++] = options[i];