From: Eric Wong <[email protected]>

pathspec.c::parse_pathspec in git assumes the `argv' array
is terminated with a NULL entry, so do not let it iterate
past the end of the array.

Signed-off-by: Eric Wong <[email protected]>
---
 ui-patch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui-patch.c b/ui-patch.c
index ec7f352..53475f7 100644
--- a/ui-patch.c
+++ b/ui-patch.c
@@ -18,7 +18,7 @@ void cgit_print_patch(const char *new_rev, const char 
*old_rev,
        struct commit *commit;
        struct object_id new_rev_oid, old_rev_oid;
        char rev_range[2 * 40 + 3];
-       const char *rev_argv[] = { NULL, "--reverse", "--format=email", 
rev_range, "--", prefix };
+       const char *rev_argv[] = { NULL, "--reverse", "--format=email", 
rev_range, "--", prefix, NULL };
        int rev_argc = ARRAY_SIZE(rev_argv);
        char *patchname;
 
-- 
EW
_______________________________________________
CGit mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to