diff options
author | Patrick Monnerat <patrick@monnerat.net> | 2017-09-22 01:08:29 +0100 |
---|---|---|
committer | Patrick Monnerat <patrick@monnerat.net> | 2017-09-22 01:08:29 +0100 |
commit | ee56fdb6910f6bf215eecede9e2e9bfc83cb5f29 (patch) | |
tree | bfdbf1f3f2f5cd9f051f6b8d0b2469c51b2660ef /tests/libtest | |
parent | fa9482ab0907dfacd0fb619add2dbf41de2d8c9c (diff) |
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).
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/lib643.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/libtest/lib643.c b/tests/libtest/lib643.c index b2698f076..c9d525bc2 100644 --- a/tests/libtest/lib643.c +++ b/tests/libtest/lib643.c @@ -113,7 +113,7 @@ static int once(char *URL, bool oldstyle) /* Fill in the file upload part */ if(oldstyle) { - res = curl_mime_name(part, "sendfile", CURL_ZERO_TERMINATED); + res = curl_mime_name(part, "sendfile"); if(!res) res = curl_mime_data_cb(part, datasize, read_callback, NULL, NULL, &pooh); @@ -122,7 +122,7 @@ static int once(char *URL, bool oldstyle) } else { /* new style */ - res = curl_mime_name(part, "sendfile alternative", CURL_ZERO_TERMINATED); + res = curl_mime_name(part, "sendfile alternative"); if(!res) res = curl_mime_data_cb(part, datasize, read_callback, NULL, NULL, &pooh); @@ -151,7 +151,7 @@ static int once(char *URL, bool oldstyle) return TEST_ERR_MAJOR_BAD; } /* Fill in the file upload part */ - res = curl_mime_name(part, "callbackdata", CURL_ZERO_TERMINATED); + res = curl_mime_name(part, "callbackdata"); if(!res) res = curl_mime_data_cb(part, datasize, read_callback, NULL, NULL, &pooh2); @@ -169,7 +169,7 @@ static int once(char *URL, bool oldstyle) } /* Fill in the filename field */ - res = curl_mime_name(part, "filename", CURL_ZERO_TERMINATED); + res = curl_mime_name(part, "filename"); if(!res) res = curl_mime_data(part, #ifdef CURL_DOES_CONVERSIONS @@ -193,7 +193,7 @@ static int once(char *URL, bool oldstyle) curl_global_cleanup(); return TEST_ERR_MAJOR_BAD; } - res = curl_mime_name(part, "submit", CURL_ZERO_TERMINATED); + res = curl_mime_name(part, "submit"); if(!res) res = curl_mime_data(part, #ifdef CURL_DOES_CONVERSIONS @@ -216,7 +216,7 @@ static int once(char *URL, bool oldstyle) curl_global_cleanup(); return TEST_ERR_MAJOR_BAD; } - res = curl_mime_name(part, "somename", CURL_ZERO_TERMINATED); + res = curl_mime_name(part, "somename"); if(!res) res = curl_mime_filename(part, "somefile.txt"); if(!res) |