]> source.dussan.org Git - rspamd.git/commitdiff
Add notice to fix issue with realloc.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 8 May 2015 21:00:57 +0000 (22:00 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 8 May 2015 21:00:57 +0000 (22:00 +0100)
src/libutil/http.c

index 0c788cc25fa97bb197c23b6a5e3afeb816ba1895..858ca55828ad63302edaba11ba04c1156c137a24 100644 (file)
@@ -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);
                }