James Bursa's fix to prevent failf() to write outside its buffer boundary
This commit is contained in:
parent
54c6f2c7c0
commit
203f66d0cb
@ -154,7 +154,7 @@ void Curl_failf(struct SessionHandle *data, const char *fmt, ...)
|
||||
if(data->set.verbose) {
|
||||
int len = strlen(data->set.errorbuffer);
|
||||
bool doneit=FALSE;
|
||||
if(len < CURL_ERROR_SIZE) {
|
||||
if(len < CURL_ERROR_SIZE - 1) {
|
||||
doneit = TRUE;
|
||||
data->set.errorbuffer[len] = '\n';
|
||||
data->set.errorbuffer[++len] = '\0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user