summaryrefslogtreecommitdiff
path: root/bundle.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-05-21 09:32:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-21 15:56:24 (GMT)
commita80aad7b85fc560451e07792d64ab6cb15a39914 (patch)
treeed917349c318912c25f5653260f4dc970287f099 /bundle.c
parent06f391906a69e410c9a6ca5e13774529a091385d (diff)
downloadgit-a80aad7b85fc560451e07792d64ab6cb15a39914.zip
git-a80aad7b85fc560451e07792d64ab6cb15a39914.tar.gz
git-a80aad7b85fc560451e07792d64ab6cb15a39914.tar.bz2
Terminate argv with NULL before calling setup_revisions()
It is convention that argv should be terminated with NULL, even if argc is used to specify the size of argv. setup_revisions() requires this and may segfault otherwise. This patch makes sure that all argv (that I can find) is NULL terminated. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle.c')
-rw-r--r--bundle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundle.c b/bundle.c
index d0dd818..e4b2aa9 100644
--- a/bundle.c
+++ b/bundle.c
@@ -98,7 +98,7 @@ int verify_bundle(struct bundle_header *header, int verbose)
*/
struct ref_list *p = &header->prerequisites;
struct rev_info revs;
- const char *argv[] = {NULL, "--all"};
+ const char *argv[] = {NULL, "--all", NULL};
struct object_array refs;
struct commit *commit;
int i, ret = 0, req_nr;