From: Daniel Stenberg Date: Sun, 31 May 2020 15:44:47 +0000 (+0200) Subject: conncache: download buffer needs +1 size for trailing zero X-Git-Tag: curl-7_71_0~75 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8346c90b789e249e42cd1e9f4542f5c55a1cc917;p=thirdparty%2Fcurl.git conncache: download buffer needs +1 size for trailing zero Follow-up to c4e6968127e Detected by OSS-Fuzz: https://oss-fuzz.com/testcase-detail/5727799779524608 --- diff --git a/lib/conncache.c b/lib/conncache.c index f98e229785..d21a00cfdd 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;