]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
James Bursa's fix to prevent failf() to write outside its buffer boundary
authorDaniel Stenberg <daniel@haxx.se>
Mon, 27 Oct 2003 06:35:47 +0000 (06:35 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 27 Oct 2003 06:35:47 +0000 (06:35 +0000)
lib/sendf.c

index 41f3092364a29f358443098a83e8f990b5277e9e..2459161d14b87abdd6c1c5d57d10a86458765bfb 100644 (file)
@@ -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';