diff options
author | Patrick Steinhardt <ps@pks.im> | 2015-04-09 21:59:06 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-04-12 22:46:28 -0700 |
commit | 5dcd1b157790232bf0b2c03ed083c8a2ff670663 (patch) | |
tree | 4640f49a91d255b128690b74e40367d6355c9dd4 | |
parent | 282616c72d1d08a77ca4fe1186cb708c38408d87 (diff) | |
download | git-5dcd1b157790232bf0b2c03ed083c8a2ff670663.tar.gz |
grep: correctly initialize help-all optionps/grep-help-all-callback-arg
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>
-rw-r--r-- | builtin/grep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index b8d440d0e0..709d20eb9e 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() }; |