grep: fix segfault when "git grep '('" is given
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
d649048e68
commit
c922b01f54
@ -26,6 +26,10 @@ test_expect_success setup '
|
||||
git commit -m initial
|
||||
'
|
||||
|
||||
test_expect_success 'grep should not segfault with a bad input' '
|
||||
test_must_fail git grep "("
|
||||
'
|
||||
|
||||
for H in HEAD ''
|
||||
do
|
||||
case "$H" in
|
||||
|
Reference in New Issue
Block a user