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 --- tests/server/fake_ntlm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/server/fake_ntlm.c') diff --git a/tests/server/fake_ntlm.c b/tests/server/fake_ntlm.c index ec127a8af..c6e36b6f6 100644 --- a/tests/server/fake_ntlm.c +++ b/tests/server/fake_ntlm.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2010, Mandy Wu, - * Copyright (C) 2011 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 2011 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -75,7 +75,7 @@ static char *printable(char *inbuf, size_t inlength) return NULL; if(!inlength) { - snprintf(&outbuf[0], outsize, "%s", NOTHING_STR); + msnprintf(&outbuf[0], outsize, "%s", NOTHING_STR); return outbuf; } @@ -97,7 +97,7 @@ static char *printable(char *inbuf, size_t inlength) o++; } else { - snprintf(&outbuf[o], outsize - o, HEX_FMT_STR, inbuf[i]); + msnprintf(&outbuf[o], outsize - o, HEX_FMT_STR, inbuf[i]); o += HEX_STR_LEN; } @@ -174,7 +174,7 @@ int main(int argc, char *argv[]) } /* logmsg cannot be used until this file name is set */ - snprintf(logfilename, sizeof(logfilename), LOGFILE, testnum); + msnprintf(logfilename, sizeof(logfilename), LOGFILE, testnum); serverlogfile = logfilename; logmsg("fake_ntlm (user: %s) (proto: %s) (domain: %s) (cached creds: %s)", -- cgit v1.2.3