Bug 389906

Summary: ZModem upload big file failed
Product: [Applications] konsole Reporter: gonglinglei
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 18.04
Attachments: fix the bug

Description gonglinglei 2018-02-05 08:27:46 UTC
1. zmodem upload implement read the whole file into memory at one time cause OOM
2. got ERROR Retry 0: Got ZCAN, Chances are the pty/tty on one of the systems are not 8-bit clean.  (Linux is 8-bit clean, NetBSD is not).
Comment 1 gonglinglei 2018-02-05 08:36:12 UTC
Created attachment 110347 [details]
fix the bug

1. read file 1Mb everytime
2. add -e flag to avoid not 8-bit clean
Comment 2 Kurt Hindenburg 2018-02-18 18:33:38 UTC
Thanks for the bug and patch.
Comment 3 Kurt Hindenburg 2018-02-18 20:54:03 UTC
Git commit 85ee97b10871bd3cc9e313d60bc2440a85902924 by Kurt Hindenburg.
Committed on 18/02/2018 at 18:32.
Pushed by hindenburg into branch 'master'.

For zmodem transfers, do not read entire file into memory

Read at most 1Mb of data instead of loading entire file into memory.
Add -e to force sender to escape all control characters

Patch/Bug by gonglinglei gmail com
FIXED-IN: 18.04

M  +7    -6    src/Session.cpp

https://commits.kde.org/konsole/85ee97b10871bd3cc9e313d60bc2440a85902924