Skip to content

Commit

Permalink
git log: avoid segfault with --all-match
Browse files Browse the repository at this point in the history
Avoid a segfault when the command

	git log --all-match

was issued, by ignoring the option.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michele Ballabio authored and Junio C Hamano committed Mar 19, 2009
1 parent 092927c commit ba150a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ba150a3

Please sign in to comment.