aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mime.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/mime.c b/lib/mime.c
index 1868336ca..c337a35c9 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -620,14 +620,13 @@ static size_t mime_mem_read(char *buffer, size_t size, size_t nitems,
{
curl_mimepart *part = (curl_mimepart *) instream;
size_t sz = (size_t) part->datasize - part->state.offset;
-
(void) size; /* Always 1.*/
if(sz > nitems)
sz = nitems;
if(sz)
- memcpy(buffer, (char *) part->data, sz);
+ memcpy(buffer, (char *) &part->data[part->state.offset], sz);
part->state.offset += sz;
return sz;