From 58cbecbf95da17a624ce5f630ad760f98323c106 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 27 Jan 2014 00:47:27 +0900 Subject: [PATCH] nghttp2_buffer: Set minimum buffer size to 8 --- lib/nghttp2_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nghttp2_buffer.c b/lib/nghttp2_buffer.c index 291acfb4..ec2649d1 100644 --- a/lib/nghttp2_buffer.c +++ b/lib/nghttp2_buffer.c @@ -49,7 +49,7 @@ int nghttp2_buffer_reserve(nghttp2_buffer *buffer, size_t len) } if(buffer->capacity < len) { uint8_t *new_buf; - size_t new_cap = buffer->capacity == 0 ? 32 : buffer->capacity * 3 / 2; + size_t new_cap = buffer->capacity == 0 ? 8 : buffer->capacity * 3 / 2; new_cap = nghttp2_min(buffer->max_capacity, nghttp2_max(new_cap, len)); new_buf = realloc(buffer->buf, new_cap); if(new_buf == NULL) {