From 203f66d0cb9f75f5dadcaec2cf4be47db1fbbc49 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 27 Oct 2003 06:35:47 +0000 Subject: James Bursa's fix to prevent failf() to write outside its buffer boundary --- lib/sendf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sendf.c b/lib/sendf.c index 41f309236..2459161d1 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'; -- cgit v1.2.3