diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-04-15 13:49:18 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-04-26 18:17:10 +0200 |
commit | d5ec44ca4cca9bbe6c21a1d2a94b37cba77661ff (patch) | |
tree | 7d4f6429f80bacd0a314726572bdddbc265f7c72 /lib/transfer.c | |
parent | 9c941e92c4bd3d2a5dbe243f7517b6a6029afc6e (diff) |
INFILESIZE: fields in UserDefined must not be changed run-time
set.infilesize in this case was modified in several places, which could
lead to repeated requests using the same handle to get unintendent/wrong
consequences based on what the previous request did!
Diffstat (limited to 'lib/transfer.c')
-rw-r--r-- | lib/transfer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index 46e55fbb5..c1cdde60b 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -926,7 +926,7 @@ 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->set.infilesize++; + data->state.infilesize++; } } else @@ -967,7 +967,7 @@ static CURLcode readwrite_upload(struct SessionHandle *data, k->writebytecount += bytes_written; - if(k->writebytecount == data->set.infilesize) { + if(k->writebytecount == data->state.infilesize) { /* we have sent all data we were supposed to */ k->upload_done = TRUE; infof(data, "We are completely uploaded and fine\n"); |