]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_getparam: pass in the snprintf("%.*s") string length as 'int'
authorDaniel Stenberg <daniel@haxx.se>
Sun, 9 Oct 2022 21:42:08 +0000 (23:42 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 10 Oct 2022 06:42:48 +0000 (08:42 +0200)
Reported by Coverity CID 1515928

Closes #9679

src/tool_getparam.c

index 510a2ff45131b0bd3c2481c68a8f84be154e25d4..62b2de035dc9605e62c1cab77cdfef32885608d1 100644 (file)
@@ -637,7 +637,7 @@ static ParameterError data_urlencode(struct GlobalConfig *global,
         return PARAM_NO_MEM;
       }
       if(nlen > 0) { /* only append '=' if we have a name */
-        msnprintf(n, outlen, "%.*s=%s", nlen, nextarg, enc);
+        msnprintf(n, outlen, "%.*s=%s", (int)nlen, nextarg, enc);
         size = outlen-1;
       }
       else {