From cc5a6e75dd99606dac676cc4e0c547d3f55c9dc2 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 1 Nov 2016 16:48:56 +0000 Subject: [CritFix] Fix chunked encoding when reading messages --- src/libutil/http.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libutil/http.c') diff --git a/src/libutil/http.c b/src/libutil/http.c index cbafec678..ba0d5117c 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -734,6 +734,11 @@ rspamd_http_on_body (http_parser * parser, const gchar *at, size_t length) /* Adjust zero-copy buf */ msg->body_buf.len += length; + + if (!(msg->flags & RSPAMD_HTTP_FLAG_SHMEM)) { + msg->body_buf.c.normal->len += length; + } + pbuf->zc_buf = msg->body_buf.begin + msg->body_buf.len; pbuf->zc_remain = msg->body_buf.allocated_len - msg->body_buf.len; } -- cgit v1.2.3