1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

conncache: download buffer needs +1 size for trailing zero

Follow-up to c4e6968127
Detected by OSS-Fuzz: https://oss-fuzz.com/testcase-detail/5727799779524608
This commit is contained in:
Daniel Stenberg 2020-05-31 17:44:47 +02:00
parent 4bd09877e3
commit 8346c90b78
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -534,7 +534,7 @@ Curl_conncache_extract_oldest(struct Curl_easy *data)
void Curl_conncache_close_all_connections(struct conncache *connc) void Curl_conncache_close_all_connections(struct conncache *connc)
{ {
struct connectdata *conn; struct connectdata *conn;
char buffer[READBUFFER_MIN]; char buffer[READBUFFER_MIN + 1];
if(!connc->closure_handle) if(!connc->closure_handle)
return; return;
connc->closure_handle->state.buffer = buffer; connc->closure_handle->state.buffer = buffer;