From: Daniel Stenberg Date: Mon, 6 Mar 2023 10:32:55 +0000 (+0100) Subject: x509asn1: use plain %x, not %lx, when the arg is an int X-Git-Tag: curl-8_0_0~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6466071e8e85011057dfad4cc860029e391edeb8;p=thirdparty%2Fcurl.git x509asn1: use plain %x, not %lx, when the arg is an int Pointed out by Coverity. Closes #10689 --- diff --git a/lib/vtls/x509asn1.c b/lib/vtls/x509asn1.c index b69c162b69..c298200452 100644 --- a/lib/vtls/x509asn1.c +++ b/lib/vtls/x509asn1.c @@ -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);