summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2015-04-09 19:59:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-04-13 05:46:28 (GMT)
commit5dcd1b157790232bf0b2c03ed083c8a2ff670663 (patch)
tree4640f49a91d255b128690b74e40367d6355c9dd4 /builtin
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
downloadgit-5dcd1b157790232bf0b2c03ed083c8a2ff670663.zip
git-5dcd1b157790232bf0b2c03ed083c8a2ff670663.tar.gz
git-5dcd1b157790232bf0b2c03ed083c8a2ff670663.tar.bz2
grep: correctly initialize help-all option
The "help-all" option is being initialized with a wrong value. While being semantically wrong this can also cause a segmentation fault in gcc on ARMv7 hardfloat platforms with a hardened toolchain. Fix this by initializing with a NULL value. Signed-off-by: Patrick Steinhardt <ps@pks.im> Reviewed-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index b8d440d..709d20e 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -740,7 +740,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
PARSE_OPT_OPTARG, NULL, (intptr_t)default_pager },
OPT_BOOL(0, "ext-grep", &external_grep_allowed__ignored,
N_("allow calling of grep(1) (ignored by this build)")),
- { OPTION_CALLBACK, 0, "help-all", &options, NULL, N_("show usage"),
+ { OPTION_CALLBACK, 0, "help-all", NULL, NULL, N_("show usage"),
PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, help_callback },
OPT_END()
};