From: Daniel Stenberg Date: Sat, 26 Sep 2015 21:36:25 +0000 (+0200) Subject: FTP: fix uploading ASCII with unknown size X-Git-Tag: curl-7_45_0~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32fc638ddf046d501abc2a58c91c3e934caf303a;p=curl FTP: fix uploading ASCII with unknown size ... don't try to increase the supposed file size on newlines if we don't know what file size it is! Patch-by: lzsiga --- diff --git a/lib/transfer.c b/lib/transfer.c index 718139b32..191523c8b 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -923,7 +923,8 @@ static CURLcode readwrite_upload(struct SessionHandle *data, if(!data->set.crlf) { /* we're here only because FTP is in ASCII mode... bump infilesize for the LF we just added */ - data->state.infilesize++; + if(data->state.infilesize != -1) + data->state.infilesize++; } } else