From: Michele Ballabio Date: Wed, 18 Mar 2009 20:53:27 +0000 (+0100) Subject: git log: avoid segfault with --all-match X-Git-Tag: v1.6.3-rc0~135 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ba150a3fdce48e4b973db6e153e6b3ffb28a0cea;p=git.git git log: avoid segfault with --all-match Avoid a segfault when the command git log --all-match was issued, by ignoring the option. Signed-off-by: Michele Ballabio Signed-off-by: Junio C Hamano --- diff --git a/grep.c b/grep.c index be99b3416..f3a27d7d6 100644 --- a/grep.c +++ b/grep.c @@ -192,7 +192,8 @@ void compile_grep_patterns(struct grep_opt *opt) * A classic recursive descent parser would do. */ p = opt->pattern_list; - opt->pattern_expression = compile_pattern_expr(&p); + if (p) + opt->pattern_expression = compile_pattern_expr(&p); if (p) die("incomplete pattern expression: %s", p->pattern); }