Commit 203f66d0 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

James Bursa's fix to prevent failf() to write outside its buffer boundary

parent 54c6f2c7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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';