From dfbfb32b43cb50fec078eeb9c3210f200233d7e8 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 16 Sep 2008 15:38:48 +0200 Subject: [PATCH] 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 --- src/plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.30.2