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 | Merge branch 'maint-1.9' into maint-2.0 (diff) | |
download | tgif-5dcd1b157790232bf0b2c03ed083c8a2ff670663.tar.xz |
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>
-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() }; |