mirror of
https://github.com/git/git.git
synced 2025-03-19 23:48:46 +00:00
builtin-grep: terminate correctly at EOF
It barfed and segfaulted with an incomplete line. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
1e3d90e013
commit
7ed36f56e3
@ -264,6 +264,8 @@ static int grep_buffer(struct grep_opt *opt, const char *name,
|
||||
}
|
||||
*eol = ch;
|
||||
bol = eol + 1;
|
||||
if (!left)
|
||||
break;
|
||||
left--;
|
||||
lno++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user