Re: [PATCH] lf_to_crlf_filter(): tell the caller we added "\n" when draining
- From
- Henrik Grubbström <grubba@roxen.com>
- Date
- Dec 19, 2011, 10:19 UTC
- Message-ID
- <Pine.GSO.4.63.1112191114010.4136@shipon.roxen.com>
- In-Reply-To
- <7vaa6sgmt3.fsf_-_@alter.siamese.dyndns.org>
On Fri, 16 Dec 2011, Junio C Hamano wrote:
> This can only happen when the input size is multiple of the > buffer size of the cascade filter (16k) and ends with an LF, > but in such a case, the code forgot to tell the caller that > it added the "\n" it could not add during the last round.
We probably ought to have a corresponding test in the testsuite. A blob consisting of a singe 'A' followed by 8192 linefeeds should be sufficient to trigger the problems.
-- Henrik Grubbström grubba@roxen.com Roxen Internet Software AB