From 28e5492cb6e33f18ad242ee8c9abbc5646810068 Mon Sep 17 00:00:00 2001 From: Jacob Nevins Date: Tue, 27 Apr 2004 18:16:33 +0000 Subject: [PATCH] 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] --- scp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scp.c b/scp.c index 781e3758..4334d9ff 100644 --- a/scp.c +++ b/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) -- 2.45.2