From ddedc1b3f37354dc7748f47c094773fb0a716e18 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sun, 19 Feb 2017 14:10:54 +0100 Subject: string formatting: fix 4 printf-style format strings --- lib/conncache.c | 2 +- lib/curl_ntlm_core.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/conncache.c b/lib/conncache.c index d8ef9a54c..a51c8fd76 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -141,7 +141,7 @@ static char *hashkey(struct connectdata *conn) else hostname = conn->host.name; - return aprintf("%s:%d", hostname, conn->port); + return aprintf("%s:%ld", hostname, conn->port); } /* Look up the bundle with all the connections to the same host this diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index e8b763aac..e02983ce6 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -715,8 +715,10 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, /* Create the BLOB structure */ snprintf((char *)ptr + NTLM_HMAC_MD5_LEN, NTLMv2_BLOB_LEN, - NTLMv2_BLOB_SIGNATURE + "%c%c%c%c" /* NTLMv2_BLOB_SIGNATURE */ "%c%c%c%c", /* Reserved = 0 */ + NTLMv2_BLOB_SIGNATURE[0], NTLMv2_BLOB_SIGNATURE[1], + NTLMv2_BLOB_SIGNATURE[2], NTLMv2_BLOB_SIGNATURE[3], 0, 0, 0, 0); Curl_write64_le(tw, ptr + 24); -- cgit v1.2.3