This project has moved and is read-only. For the latest updates, please go here.
1

Closed

IdMessageDecoder.ReadLn() corrupts binary data

description

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 1:20 AM by gambit47

comments

gambit47 wrote Dec 12, 2012 at 10:25 AM

Fixed in rev 4636.

wrote Feb 13, 2013 at 11:09 PM

wrote May 16, 2013 at 6:14 AM

wrote May 16, 2013 at 6:14 AM

wrote Jun 14, 2013 at 8:50 AM

wrote Apr 6 at 1:20 AM