bsdgrep(1): Evict character sequence that moved in

Reported by:	trasz
This commit is contained in:
Kyle Evans 2018-06-08 12:58:55 +00:00
parent 46033610ec
commit d1a920b48f

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;