From: Daniel Stenberg Date: Mon, 18 May 2020 16:51:37 +0000 (+0200) Subject: sendf: make failf() use the mvsnprintf() return code X-Git-Tag: curl-7_71_0~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74623551f306990e70c7c5515b88972005604a74;p=thirdparty%2Fcurl.git sendf: make failf() use the mvsnprintf() return code ... and avoid a strlen() call. Fixes a MonocleAI warning. Reported-by: MonocleAI Fixes #5413 Closes #5420 --- diff --git a/lib/sendf.c b/lib/sendf.c index 6ad32e1b39..92caf7cec9 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -267,8 +267,7 @@ void Curl_failf(struct Curl_easy *data, const char *fmt, ...) size_t len; char error[CURL_ERROR_SIZE + 2]; va_start(ap, fmt); - mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap); - len = strlen(error); + len = mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap); if(data->set.errorbuffer && !data->state.errorbuf) { strcpy(data->set.errorbuffer, error);