From: Vsevolod Stakhov Date: Tue, 1 Nov 2016 16:48:56 +0000 (+0000) Subject: [CritFix] Fix chunked encoding when reading messages X-Git-Tag: 1.4.0~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc5a6e75dd99606dac676cc4e0c547d3f55c9dc2;p=thirdparty%2Frspamd.git [CritFix] Fix chunked encoding when reading messages --- diff --git a/src/libutil/http.c b/src/libutil/http.c index cbafec678a..ba0d5117c2 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; }