]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
x509asn1: use plain %x, not %lx, when the arg is an int
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Mar 2023 10:32:55 +0000 (11:32 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Mar 2023 22:59:12 +0000 (23:59 +0100)
Pointed out by Coverity.

Closes #10689

lib/vtls/x509asn1.c

index b69c162b6934e5f51cd02e405024d63a9d3c8165..c2982004523d6a7ac2d51cc149cbec97696f97c9 100644 (file)
@@ -1118,7 +1118,7 @@ CURLcode Curl_extract_certinfo(struct Curl_easy *data,
   for(ccp = cert.version.beg; ccp < cert.version.end; ccp++)
     version = (version << 8) | *(const unsigned char *) ccp;
   if(data->set.ssl.certinfo) {
-    ccp = curl_maprintf("%lx", version);
+    ccp = curl_maprintf("%x", version);
     if(!ccp)
       return CURLE_OUT_OF_MEMORY;
     result = Curl_ssl_push_certinfo(data, certnum, "Version", ccp);