From a80aad7b85fc560451e07792d64ab6cb15a39914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Thu, 21 May 2009 19:32:44 +1000 Subject: Terminate argv with NULL before calling setup_revisions() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- bundle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bundle.c') diff --git a/bundle.c b/bundle.c index d0dd818b31..e4b2aa9c4a 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; -- cgit v1.2.1