From 82d6a53eb6d62376b333e9a9cf2d7d23971d175f Mon Sep 17 00:00:00 2001 From: BakasuraRCE Date: Sun, 26 May 2019 19:09:43 -0500 Subject: [PATCH] fishlim: Allocate a right memory size --- plugins/fishlim/plugin_hexchat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/fishlim/plugin_hexchat.c b/plugins/fishlim/plugin_hexchat.c index 1752f9b9..f0e6850f 100644 --- a/plugins/fishlim/plugin_hexchat.c +++ b/plugins/fishlim/plugin_hexchat.c @@ -198,7 +198,7 @@ static int handle_incoming(char *word[], char *word_eol[], hexchat_event_attrs * if (!decrypted) goto decrypt_error; /* Build unecrypted message */ - message = g_string_sized_new (100); /* TODO: more accurate estimation of size */ + message = g_string_sized_new (strlen(word_eol[1])); /* Just put at least the size of original command */ g_string_append (message, "RECV"); if (attrs->server_time_utc)