From: Jonas Fonseca Date: Sat, 17 Jan 2009 18:57:10 +0000 (+0100) Subject: Fix serious bug where a stack allocated variable was returned X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=66eacf7398666d7c2a4562140d819100c4e79498;p=tig.git Fix serious bug where a stack allocated variable was returned Reproducable when calling tig with log arguments. --- 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 };