1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

sendf: make failf() use the mvsnprintf() return code

... and avoid a strlen() call. Fixes a MonocleAI warning.

Reported-by: MonocleAI
Fixes #5413
Closes #5420
This commit is contained in:
Daniel Stenberg 2020-05-18 18:51:37 +02:00
parent 67521b5ecf
commit 74623551f3
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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);