diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-01-03 12:00:58 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-01-03 23:47:23 +0100 |
commit | c7c362a24c0247644f9fde05e8ea353af4a94b04 (patch) | |
tree | 5e9debaa8793f44957c7f34c3708eb873216e669 /tests/libtest | |
parent | d42520f2c8321540454a2f7c1141c99e27bba8f7 (diff) | |
download | curl-c7c362a24c0247644f9fde05e8ea353af4a94b04.tar.gz |
libtest/stub_gssapi: use "real" snprintf
... since it doesn't link with libcurl.
Reverts the commit dcd6f81025 changes from this file.
Bug: https://curl.haxx.se/mail/lib-2019-01/0000.html
Reported-by: Shlomi Fish
Reviewed-by: Daniel Gustafsson
Reviewed-by: Kamil Dudka
Closes #3434
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/stub_gssapi.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/libtest/stub_gssapi.c b/tests/libtest/stub_gssapi.c index 254a01b31..377b75452 100644 --- a/tests/libtest/stub_gssapi.c +++ b/tests/libtest/stub_gssapi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2017-2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2017-2019, 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 @@ -28,10 +28,7 @@ #include "stub_gssapi.h" -#define ENABLE_CURLX_PRINTF -/* make the curlx header define all printf() functions to use the curlx_* - versions instead */ -#include "curlx.h" /* from the private lib dir */ +/* !checksrc! disable SNPRINTF all */ #define MAX_CREDS_LENGTH 250 #define APPROX_TOKEN_LEN 250 @@ -207,8 +204,10 @@ OM_uint32 gss_init_sec_context(OM_uint32 *min, } /* Token format: creds:target:type:padding */ - used = msnprintf(token, length, "%s:%s:%d:", creds, - (char *) target_name, ctx->sent); + /* Note: this is using the *real* snprintf() and not the curl provided + one */ + used = snprintf(token, length, "%s:%s:%d:", creds, + (char *) target_name, ctx->sent); if(used >= length) { free(token); |