From: Daniel Stenberg Date: Mon, 27 Oct 2003 06:35:47 +0000 (+0000) Subject: James Bursa's fix to prevent failf() to write outside its buffer boundary X-Git-Tag: curl-7_10_8~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=203f66d0cb9f75f5dadcaec2cf4be47db1fbbc49;p=thirdparty%2Fcurl.git James Bursa's fix to prevent failf() to write outside its buffer boundary --- diff --git a/lib/sendf.c b/lib/sendf.c index 41f3092364..2459161d14 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -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';