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>
This commit is contained in:
parent
282616c72d
commit
5dcd1b1577
@ -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()
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user