bsdgrep(1): Evict character sequence that moved in

Reported by:	trasz
This commit is contained in:
kevans 2018-06-08 12:58:55 +00:00
parent 9490ffe5ef
commit 04590ae82f

View File

@ -113,7 +113,7 @@ grep_fgetln(struct file *f, struct parsec *pc)
return (bufpos);
}
/* Look for a newline in the remaining part of the [6rbuffer */
/* Look for a newline in the remaining part of the buffer */
if ((p = memchr(bufpos, fileeol, bufrem)) != NULL) {
++p; /* advance over newline */
ret = bufpos;