diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-10-16 23:47:58 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-10-16 23:47:58 -0700 |
commit | 050dfc4535578c2c49832ffeb3f05dbd4c6adff2 (patch) | |
tree | 216b983a3c019f5a8a3721550afcb271d2185dbb /builtin-grep.c | |
parent | b3118bdc91876cbc04b7e81dcf7bea71d86ce4f8 (diff) | |
parent | cfe370c6476392095bc3f18013d195b1cccd6184 (diff) | |
download | git-050dfc4535578c2c49832ffeb3f05dbd4c6adff2.tar.gz |
Merge branch 'maint-1.6.4' into maint
* maint-1.6.4:
grep: do not segfault when -f is used
Diffstat (limited to 'builtin-grep.c')
-rw-r--r-- | builtin-grep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-grep.c b/builtin-grep.c index 761799d7d0..1df25b07b5 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -631,7 +631,7 @@ static int file_callback(const struct option *opt, const char *arg, int unset) struct grep_opt *grep_opt = opt->value; FILE *patterns; int lno = 0; - struct strbuf sb; + struct strbuf sb = STRBUF_INIT; patterns = fopen(arg, "r"); if (!patterns) |