]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib1598: fix `CURLOPT_POSTFIELDSIZE` usage
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 8 Mar 2024 07:45:10 +0000 (08:45 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 8 Mar 2024 12:08:59 +0000 (13:08 +0100)
It requires a `long` argument.

Closes https://github.com/curl/curl/pull/13085

tests/libtest/lib1598.c

index 63cdfcfb64c259ca08156c75c5079e17bdc18464..c099116a86a144b462969360bf7844c1e1b46af7 100644 (file)
@@ -87,7 +87,7 @@ int test(char *URL)
 
   test_setopt(curl, CURLOPT_URL, URL);
   test_setopt(curl, CURLOPT_HTTPHEADER, hhl);
-  test_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(post_data));
+  test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(post_data));
   test_setopt(curl, CURLOPT_POSTFIELDS, post_data);
   test_setopt(curl, CURLOPT_TRAILERFUNCTION, trailers_callback);
   test_setopt(curl, CURLOPT_TRAILERDATA, NULL);