From dcd6f810255785d52b89150e18460fb0899d4f7e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 22 Nov 2018 09:01:24 +0100 Subject: snprintf: renamed and we now only use msnprintf() The function does not return the same value as snprintf() normally does, so readers may be mislead into thinking the code works differently than it actually does. A different function name makes this easier to detect. Reported-by: Tomas Hoger Assisted-by: Daniel Gustafsson Fixes #3296 Closes #3297 --- lib/doh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/doh.c') diff --git a/lib/doh.c b/lib/doh.c index ef6013db9..497ad8d21 100644 --- a/lib/doh.c +++ b/lib/doh.c @@ -660,13 +660,13 @@ static void showdoh(struct Curl_easy *data, char buffer[128]; char *ptr; size_t len; - snprintf(buffer, 128, "DOH AAAA: "); + msnprintf(buffer, 128, "DOH AAAA: "); ptr = &buffer[10]; len = 118; for(j = 0; j < 16; j += 2) { size_t l; - snprintf(ptr, len, "%s%02x%02x", j?":":"", d->addr[i].ip.v6[j], - d->addr[i].ip.v6[j + 1]); + msnprintf(ptr, len, "%s%02x%02x", j?":":"", d->addr[i].ip.v6[j], + d->addr[i].ip.v6[j + 1]); l = strlen(ptr); len -= l; ptr += l; -- cgit v1.2.3