mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
Revert "sendf: make failf() use the mvsnprintf() return code"
This reverts commit 74623551f3
.
Instead mark the function call with (void). Getting the return code and
using it instead triggered Coverity warning CID 1463596 because
snprintf() can return a negative value...
Closes #5441
This commit is contained in:
parent
5d965b4898
commit
f6c6a159f5
@ -267,7 +267,8 @@ void Curl_failf(struct Curl_easy *data, const char *fmt, ...)
|
|||||||
size_t len;
|
size_t len;
|
||||||
char error[CURL_ERROR_SIZE + 2];
|
char error[CURL_ERROR_SIZE + 2];
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
len = mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
|
(void)mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
|
||||||
|
len = strlen(error);
|
||||||
|
|
||||||
if(data->set.errorbuffer && !data->state.errorbuf) {
|
if(data->set.errorbuffer && !data->state.errorbuf) {
|
||||||
strcpy(data->set.errorbuffer, error);
|
strcpy(data->set.errorbuffer, error);
|
||||||
|
Loading…
Reference in New Issue
Block a user