This project has moved. For the latest updates, please go here.


IdMessageDecoder.ReadLn() corrupts binary data


When TIdMessageDecoderMIME.ReadBody() calls TIdMessageDecoder.ReadLn() to read a binary-encoded line from a non-TCP stream, ReadLn() calls IdGlobal.ReadLnFromStream(), which does not have an ATerminator parameter. For binary-encoded data, ReadBody() expects the read to stop on a CRLF terminator only, and then it writes hard-coded CRLFs into the destination TStream. However, ReadLnFromStream() stops on a bare CR, a bare LF, or a CRLF, whichever it encounters first. If a line is terminated by a bare CR or a bare LF, data corruption occurs. ReadLn() needs to respect its ATerminator parameter regardless of what type of TStream is being used.
Closed Apr 6 at 12:20 AM by gambit47


gambit47 wrote Dec 12, 2012 at 9:25 AM

Fixed in rev 4636.

wrote Feb 13, 2013 at 10:09 PM

wrote May 16, 2013 at 5:14 AM

wrote May 16, 2013 at 5:14 AM

wrote Jun 14, 2013 at 7:50 AM

wrote Apr 6 at 12:20 AM