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 /src/tool_cb_hdr.c | |
parent | 9944d6ba334f07b0b6199bdb5bb82091c88c16ed (diff) | |
download | curl-dcd6f810255785d52b89150e18460fb0899d4f7e.tar.gz |
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 'src/tool_cb_hdr.c')
-rw-r--r-- | src/tool_cb_hdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c index 7a7a836c4..84b0d9c87 100644 --- a/src/tool_cb_hdr.c +++ b/src/tool_cb_hdr.c @@ -274,7 +274,7 @@ static char *parse_filename(const char *ptr, size_t len) char *tdir = curlx_getenv("CURL_TESTDIR"); if(tdir) { char buffer[512]; /* suitably large */ - snprintf(buffer, sizeof(buffer), "%s/%s", tdir, copy); + msnprintf(buffer, sizeof(buffer), "%s/%s", tdir, copy); Curl_safefree(copy); copy = strdup(buffer); /* clone the buffer, we don't use the libcurl aprintf() or similar since we want to use the |