From ee56fdb6910f6bf215eecede9e2e9bfc83cb5f29 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Fri, 22 Sep 2017 01:08:29 +0100 Subject: form/mime: field names are not allowed to contain zero-valued bytes. Also suppress length argument of curl_mime_name() (names are always zero-terminated). --- tests/data/test1404 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/data/test1404') diff --git a/tests/data/test1404 b/tests/data/test1404 index 20dc01333..53ab37b49 100644 --- a/tests/data/test1404 +++ b/tests/data/test1404 @@ -125,7 +125,7 @@ int main(int argc, char *argv[]) mime1 = curl_mime_init(hnd); part1 = curl_mime_addpart(mime1); curl_mime_data(part1, "value", CURL_ZERO_TERMINATED); - curl_mime_name(part1, "name", CURL_ZERO_TERMINATED); + curl_mime_name(part1, "name"); part1 = curl_mime_addpart(mime1); mime2 = curl_mime_init(hnd); part2 = curl_mime_addpart(mime2); @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) slist1 = NULL; curl_mime_subparts(part1, mime2); mime2 = NULL; - curl_mime_name(part1, "file", CURL_ZERO_TERMINATED); + curl_mime_name(part1, "file"); curl_easy_setopt(hnd, CURLOPT_MIMEPOST, mime1); curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped"); curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); -- cgit v1.2.3