From 3a616243218104788fad9c1a3a9307c7972a461f Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Wed, 11 Mar 2015 09:03:33 +0000 Subject: Fixed an overflow when logging messages for plugins. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@487 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 5 +++++ src/plugins/plugin.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2fa7fc2..cd2fa23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +15-03-11 Cyrille Bagard + + * src/plugins/plugin.c: + Fix an overflow when logging messages for plugins. + 15-03-10 Cyrille Bagard * src/dialogs/gotox.c: diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 0ca19e4..fb970b3 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -349,7 +349,7 @@ void g_plugin_module_log_simple_message(const GPluginModule *plugin, LogMessageT size_t len; /* Taille tampon disponible */ char *buffer; /* Tampon du msg reconstitué */ - len = 3 +1 + strlen(plugin->interface->name) + 3 + 2 + strlen(msg) + 1; + len = 4 + strlen(plugin->interface->name) + 6 + strlen(msg) + 1; buffer = calloc(len, sizeof(char)); strcpy(buffer, "["); -- cgit v0.11.2-87-g4458