summaryrefslogtreecommitdiff
path: root/lib/file.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-04-15 13:49:18 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-04-26 18:17:10 +0200
commitd5ec44ca4cca9bbe6c21a1d2a94b37cba77661ff (patch)
tree7d4f6429f80bacd0a314726572bdddbc265f7c72 /lib/file.c
parent9c941e92c4bd3d2a5dbe243f7517b6a6029afc6e (diff)
downloadcurl-d5ec44ca4cca9bbe6c21a1d2a94b37cba77661ff.tar.gz
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/file.c')
-rw-r--r--lib/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/file.c b/lib/file.c
index 043cccd47..73df42e02 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -336,9 +336,9 @@ static CURLcode file_upload(struct connectdata *conn)
return CURLE_WRITE_ERROR;
}
- if(-1 != data->set.infilesize)
+ if(-1 != data->state.infilesize)
/* known size of data to "upload" */
- Curl_pgrsSetUploadSize(data, data->set.infilesize);
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
/* treat the negative resume offset value as the case of "-" */
if(data->state.resume_from < 0) {