Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Craigium

Thanks.
If it helps, I did a bit more investigating and found that it seems to happen when a CR+LF is split between SFTP data packets. One packet ends in x0D and the next packet (after overhead bytes) starts x0A. Looks like the fix for issue 1059 should have handled that, but my C++ knowledge is not great.
Craigium

Rare CR+LF conversion issue

When downloading files with CR+LF line endings from a Linux server in ASCII mode, extra CR bytes may occasionally be added incorrectly. This issue seems to occur when there are two consecutive CR+LF sequences located at specific offsets close to 32KB or any multiple of 32K.

Seems to be similar to these fixed issues,
Issue 1059 – Rare incorrect conversion of line endings and
Issue 845 – Rare incorrect conversion of line endings.

WinSCP version: 6.3.5 (also tested 6.4 beta and some older versions)
OS: Windows 10/11
Protocol: SFTP-3

Attached some files for testing.

Steps to reproduce:

  1. Upload one of the test files to Linux server in Binary mode
  2. Download it from Linux server in Text mode
  3. Compare to original file to see that additional CR byte(s) will have been added

Hope this explains the issue, let me know if you need me to test anything.