mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Krzysztof Kowalczyk's fix for "Assertion failed: actuallen <= len" when
transferring files >2G with PSCP. (I'm unable to actually test this works, but it looks plausible, and small transfers aren't mangled.) [originally from svn r4152]
This commit is contained in:
parent
3f20a5b4b3
commit
28e5492cb6
7
scp.c
7
scp.c
@ -1833,11 +1833,12 @@ static void sink(char *targ, char *src)
|
||||
received = 0;
|
||||
while (received < act.size) {
|
||||
char transbuf[4096];
|
||||
int blksize, read;
|
||||
unsigned long blksize;
|
||||
int read;
|
||||
blksize = 4096;
|
||||
if (blksize > (int)(act.size - received))
|
||||
if (blksize > (act.size - received))
|
||||
blksize = act.size - received;
|
||||
read = scp_recv_filedata(transbuf, blksize);
|
||||
read = scp_recv_filedata(transbuf, (int)blksize);
|
||||
if (read <= 0)
|
||||
bump("Lost connection");
|
||||
if (wrerror)
|
||||
|
Loading…
Reference in New Issue
Block a user