From 8346c90b789e249e42cd1e9f4542f5c55a1cc917 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 31 May 2020 17:44:47 +0200 Subject: conncache: download buffer needs +1 size for trailing zero Follow-up to c4e6968127e Detected by OSS-Fuzz: https://oss-fuzz.com/testcase-detail/5727799779524608 --- lib/conncache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/conncache.c b/lib/conncache.c index f98e22978..d21a00cfd 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -534,7 +534,7 @@ Curl_conncache_extract_oldest(struct Curl_easy *data) void Curl_conncache_close_all_connections(struct conncache *connc) { struct connectdata *conn; - char buffer[READBUFFER_MIN]; + char buffer[READBUFFER_MIN + 1]; if(!connc->closure_handle) return; connc->closure_handle->state.buffer = buffer; -- cgit v1.2.3