From: Sebastian Harl Date: Tue, 16 Sep 2008 13:38:48 +0000 (+0200) Subject: src/plugin.c: Increase the plugin_log() message buffer to 1024 bytes. X-Git-Tag: collectd-4.4.4~22 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dfbfb32b43cb50fec078eeb9c3210f200233d7e8;p=collectd.git src/plugin.c: Increase the plugin_log() message buffer to 1024 bytes. 512 bytes is not enough for some perl error messages. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/src/plugin.c b/src/plugin.c index fdc0425b..e72561bd 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -823,7 +823,7 @@ int plugin_dispatch_notification (const notification_t *notif) void plugin_log (int level, const char *format, ...) { - char msg[512]; + char msg[1024]; va_list ap; void (*callback) (int, const char *); @@ -838,8 +838,8 @@ void plugin_log (int level, const char *format, ...) #endif va_start (ap, format); - vsnprintf (msg, 512, format, ap); - msg[511] = '\0'; + vsnprintf (msg, sizeof (msg), format, ap); + msg[sizeof (msg) - 1] = '\0'; va_end (ap); le = llist_head (list_log);