All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] grep: correctly initialize help-all option
@ 2015-04-09 13:41 Patrick Steinhardt
  2015-04-09 19:45 ` Eric Sunshine
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Patrick Steinhardt @ 2015-04-09 13:41 UTC (permalink / raw)
  To: git; +Cc: Patrick Steinhardt

The "help-all" option is being initialized with a wrong value.
While being semantically wrong this can also cause a gcc
segmentation fault on ARMv7 hardfloat platforms with a hardened
toolchain. Fix this by initializing with the correct value.
---
 builtin/grep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/grep.c b/builtin/grep.c
index abc4400..c0bf005 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -738,7 +738,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", &opt, NULL, N_("show usage"),
 		  PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, help_callback },
 		OPT_END()
 	};
-- 
2.3.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-04-11  0:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-09 13:41 [PATCH] grep: correctly initialize help-all option Patrick Steinhardt
2015-04-09 19:45 ` Eric Sunshine
2015-04-09 19:59 ` [PATCH v2] " Patrick Steinhardt
2015-04-10 16:35   ` René Scharfe
2015-04-09 21:55 ` [PATCH] " René Scharfe
2015-04-10  5:22   ` Patrick Steinhardt
2015-04-10 16:34     ` René Scharfe
2015-04-11  0:34       ` Patrick Steinhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.