x509asn1: use plain %x, not %lx, when the arg is an int

Pointed out by Coverity.

Closes #10689
This commit is contained in:
Daniel Stenberg 2023-03-06 11:32:55 +01:00
parent 48cd032623
commit 6466071e8e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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);