Fixed bug #2933667: CRLF filter broken.
This commit is contained in:
parent
45faafdced
commit
b94fe09cae
@ -231,8 +231,8 @@ void CRLFToLFFilteredOutputStream::write
|
|||||||
|
|
||||||
if (previousChar == '\r')
|
if (previousChar == '\r')
|
||||||
{
|
{
|
||||||
if (pos != data)
|
if (pos != start)
|
||||||
m_stream.write(start, pos - 1 - data); // do not write \r
|
m_stream.write(start, pos - 1 - start); // do not write \r
|
||||||
|
|
||||||
m_stream.write("\n", 1);
|
m_stream.write("\n", 1);
|
||||||
|
|
||||||
|
@ -175,6 +175,7 @@ VMIME_TEST_SUITE_BEGIN
|
|||||||
testFilteredOutputStreamHelper<FILTER>("4", "foo\nbar", "foo", "\r\nbar");
|
testFilteredOutputStreamHelper<FILTER>("4", "foo\nbar", "foo", "\r\nbar");
|
||||||
testFilteredOutputStreamHelper<FILTER>("5", "foo\nbar", "foo", "\r", "\nbar");
|
testFilteredOutputStreamHelper<FILTER>("5", "foo\nbar", "foo", "\r", "\nbar");
|
||||||
testFilteredOutputStreamHelper<FILTER>("6", "foo\nbar", "foo", "\r", "\n", "bar");
|
testFilteredOutputStreamHelper<FILTER>("6", "foo\nbar", "foo", "\r", "\n", "bar");
|
||||||
|
testFilteredOutputStreamHelper<FILTER>("7", "foo\nba\nr", "foo\r", "\nba\r\nr");
|
||||||
}
|
}
|
||||||
|
|
||||||
// stopSequenceFilteredInputStream
|
// stopSequenceFilteredInputStream
|
||||||
|
Loading…
Reference in New Issue
Block a user