diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-11-22 09:01:24 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-11-23 08:26:51 +0100 |
commit | dcd6f810255785d52b89150e18460fb0899d4f7e (patch) | |
tree | c3cb7cdcb79dbf752edcd997934e44a2e9998397 /tests/server/fake_ntlm.c | |
parent | 9944d6ba334f07b0b6199bdb5bb82091c88c16ed (diff) |
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
Diffstat (limited to 'tests/server/fake_ntlm.c')
-rw-r--r-- | tests/server/fake_ntlm.c | 8 |
1 files changed, 4 insertions, 4 deletions
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, <mandy.wu@intel.com> - * Copyright (C) 2011 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2011 - 2018, Daniel Stenberg, <daniel@haxx.se>, 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)", |