aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2017-09-20 12:01:11 +0100
committerPatrick Monnerat <patrick@monnerat.net>2017-09-20 12:01:11 +0100
commitf3042018686c0e5659264acb9bc20373c4e4503a (patch)
treeaf806aff4ae6f9510e018e5ec87a4cc479859699
parent299896ca0963a79d5ec4de8ca83922c48f16f1bb (diff)
mime: fix an explicit null dereference (#1899)
-rw-r--r--lib/mime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mime.c b/lib/mime.c
index 312094d7f..4eeb8375d 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -1604,7 +1604,7 @@ CURLcode Curl_mime_prepare_headers(curl_mimepart *part,
/* Be sure we won't access old headers later. */
if(part->state.state == MIMESTATE_CURLHEADERS)
- mimesetstate(&mime->state, MIMESTATE_CURLHEADERS, NULL);
+ mimesetstate(&part->state, MIMESTATE_CURLHEADERS, NULL);
/* Build the content-type header. */
s = search_header(part->userheaders, "Content-Type");
@@ -1704,7 +1704,7 @@ CURLcode Curl_mime_prepare_headers(curl_mimepart *part,
/* If we were reading curl-generated headers, restart with new ones (this
should not occur). */
if(part->state.state == MIMESTATE_CURLHEADERS)
- mimesetstate(&mime->state, MIMESTATE_CURLHEADERS, part->curlheaders);
+ mimesetstate(&part->state, MIMESTATE_CURLHEADERS, part->curlheaders);
/* Process subparts. */
if(part->kind == MIMEKIND_MULTIPART && mime) {