diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-03-11 09:03:33 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-03-11 09:03:33 (GMT) |
commit | 3a616243218104788fad9c1a3a9307c7972a461f (patch) | |
tree | f31077c9ee394fcaa1d12fa5c2d93b22d13d0311 | |
parent | a781eff1a2ac805eeeb93a9ed254edd3decb1024 (diff) |
Fixed an overflow when logging messages for plugins.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@487 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/plugins/plugin.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +15-03-11 Cyrille Bagard <nocbos@gmail.com> + + * src/plugins/plugin.c: + Fix an overflow when logging messages for plugins. + 15-03-10 Cyrille Bagard <nocbos@gmail.com> * 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, "<i>["); |