OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
282616c
)
grep: correctly initialize help-all option
author
Patrick Steinhardt
<ps@pks.im>
Thu, 9 Apr 2015 19:59:06 +0000
(21:59 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 13 Apr 2015 05:46:28 +0000
(22:46 -0700)
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>
builtin/grep.c
patch
|
blob
|
history
diff --git
a/builtin/grep.c
b/builtin/grep.c
index
b8d440d
..
709d20e
100644
(file)
--- 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()
};