From 687d60392ec948bc849e2fb7a81c67bbfacd41f6 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 8 May 2015 22:00:57 +0100 Subject: [PATCH] Add notice to fix issue with realloc. --- src/libutil/http.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libutil/http.c b/src/libutil/http.c index 0c788cc25..858ca5582 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -1535,6 +1535,13 @@ rspamd_http_connection_write_message (struct rspamd_http_connection *conn, /* Add some used vars */ meth_pos = buf->str + buf->len; + /* XXX: bad bad bad + * TODO: + * XXX: + * Actually, g_string_append_len can break everything as it may do realloc, + * hence, we need to store offsets here instead of the direct pointers + * XXX: fix fix fix + */ if (conn->type == RSPAMD_HTTP_SERVER) { g_string_append_len (buf, repbuf, meth_len); } -- 2.39.5