From 66eacf7398666d7c2a4562140d819100c4e79498 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 17 Jan 2009 19:57:10 +0100 Subject: [PATCH] Fix serious bug where a stack allocated variable was returned Reproducable when calling tig with log arguments. --- tig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tig.c b/tig.c index d812fa3..08f080a 100644 --- a/tig.c +++ b/tig.c @@ -797,7 +797,7 @@ parse_options(int argc, const char *argv[], const char ***run_argv) bool seen_dashdash = FALSE; /* XXX: This is vulnerable to the user overriding options * required for the main view parser. */ - const char *custom_argv[SIZEOF_ARG] = { + static const char *custom_argv[SIZEOF_ARG] = { "git", "log", "--no-color", "--pretty=raw", "--parents", "--topo-order", NULL }; -- 2.30.2