diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/loader/ftp.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/loader/ftp.nim b/src/loader/ftp.nim index f380e5e9..49d4a39c 100644 --- a/src/loader/ftp.nim +++ b/src/loader/ftp.nim @@ -32,6 +32,7 @@ proc curlWriteHeader(p: cstring, size: csize_t, nitems: csize_t, userdata: pointer): csize_t {.cdecl.} = var line = newString(nitems) if nitems > 0: + prepareMutation(line) copyMem(addr line[0], addr p[0], nitems) let op = cast[FtpHandle](userdata) @@ -91,6 +92,7 @@ proc curlWriteBody(p: cstring, size: csize_t, nmemb: csize_t, if op.dirmode: let i = op.buffer.len op.buffer.setLen(op.buffer.len + int(nmemb)) + prepareMutation(op.buffer) copyMem(addr op.buffer[i], addr p[0], nmemb) else: if not op.handle.sendData(p, int(nmemb)): |