author | Matt Kraai <kraai@ftbfs.org> | |
Fri, 16 Oct 2009 14:13:25 +0000 (07:13 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 17 Oct 2009 06:47:47 +0000 (23:47 -0700) | ||
commit | cfe370c6476392095bc3f18013d195b1cccd6184 | |
tree | a9f923388f0c478f01b06b3d33c5fbe0abeeeb36 | tree | snapshot |
parent | 0a0c342568458a15528778db1480dbbaa9a0b4d9 | commit | diff |
grep: do not segfault when -f is used
"git grep" would segfault if its -f option was used because it would
try to use an uninitialized strbuf, so initialize the strbuf.
Thanks to Johannes Sixt <j.sixt@viscovery.net> for the help with the
test cases.
Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
"git grep" would segfault if its -f option was used because it would
try to use an uninitialized strbuf, so initialize the strbuf.
Thanks to Johannes Sixt <j.sixt@viscovery.net> for the help with the
test cases.
Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-grep.c | diff | blob | history | |
t/t7002-grep.sh | diff | blob | history |