From 94a1d09ac7500afdd6f3cef3fbfefa16072f2704 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Fri, 12 Mar 2004 14:22:16 +0000
Subject: [PATCH] more variable type fixing for the huge posts

---
 lib/formdata.c | 2 +-
 lib/formdata.h | 2 +-
 lib/http.c     | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/formdata.c b/lib/formdata.c
index ccb73fad03..58d1547af9 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -1100,7 +1100,7 @@ void curl_formfree(struct curl_httppost *form)
 
 CURLcode Curl_getFormData(struct FormData **finalform,
                           struct curl_httppost *post,
-                          size_t *sizep)
+                          curl_off_t *sizep)
 {
   struct FormData *form = NULL;
   struct FormData *firstform;
diff --git a/lib/formdata.h b/lib/formdata.h
index 6fdec9f132..df6ae3ac07 100644
--- a/lib/formdata.h
+++ b/lib/formdata.h
@@ -57,7 +57,7 @@ int Curl_FormInit(struct Form *form, struct FormData *formdata );
 CURLcode
 Curl_getFormData(struct FormData **,
                  struct curl_httppost *post,
-                 size_t *size);
+                 curl_off_t *size);
 
 /* fread() emulation */
 size_t Curl_FormReader(char *buffer,
diff --git a/lib/http.c b/lib/http.c
index a81a7bbf66..19473d3f19 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -457,8 +457,8 @@ static size_t readmoredata(char *buffer,
   conn->bits.forbidchunk= (http->sending == HTTPSEND_REQUEST)?TRUE:FALSE;
 
   if(http->postsize <= fullsize) {
-    memcpy(buffer, http->postdata, http->postsize);
-    fullsize = http->postsize;
+    memcpy(buffer, http->postdata, (size_t)http->postsize);
+    fullsize = (size_t)http->postsize;
 
     if(http->backup.postsize) {
       /* move backup data into focus and continue on that */
-- 
GitLab