From: Vsevolod Stakhov Date: Fri, 8 May 2015 21:00:57 +0000 (+0100) Subject: Add notice to fix issue with realloc. X-Git-Tag: 0.9.0~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=687d60392ec948bc849e2fb7a81c67bbfacd41f6;p=thirdparty%2Frspamd.git Add notice to fix issue with realloc. --- diff --git a/src/libutil/http.c b/src/libutil/http.c index 0c788cc25f..858ca55828 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); }