mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08: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:
parent
67521b5ecf
commit
74623551f3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user