diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-29 11:47:22 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-29 12:45:13 +0100 |
commit | deee48d495510b5e8d2a17c887f7c33046100778 (patch) | |
tree | 9d14e2fec801c7f04e4aa262ca185935ce5e9a2f | |
parent | 218d7142767cc1e21639ada6a24513132b9a2b80 (diff) | |
download | rspamd-deee48d495510b5e8d2a17c887f7c33046100778.tar.gz rspamd-deee48d495510b5e8d2a17c887f7c33046100778.zip |
Avoid double free when extending HTTP message.
-rw-r--r-- | src/libutil/http.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c index 5e589afc2..a9b4e1de2 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -613,6 +613,8 @@ rspamd_http_on_body (http_parser * parser, const gchar *at, size_t length) priv = conn->priv; g_string_append_len (priv->msg->body, at, length); + /* Append might cause realloc */ + priv->msg->body_buf.str = priv->msg->body->str; if ((conn->opts & RSPAMD_HTTP_BODY_PARTIAL) && !priv->encrypted) { /* Incremental update is basically impossible for encrypted requests */ |