From caf4f53cce0477ca867a3fe4446e193c40dcb8fc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 24 Aug 2012 16:08:56 +0400 Subject: [PATCH] Make lua logger format safe. --- src/lua/lua_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c index f3a33a7d2..818073dc8 100644 --- a/src/lua/lua_common.c +++ b/src/lua/lua_common.c @@ -299,18 +299,18 @@ lua_common_log (GLogLevelFlags level, lua_State *L, const gchar *msg) } rspamd_snprintf (func_buf, sizeof (func_buf), "%s:%d", p, d.currentline); if (level == G_LOG_LEVEL_DEBUG) { - rspamd_conditional_debug(rspamd_main->logger, -1, func_buf, msg); + rspamd_conditional_debug (rspamd_main->logger, -1, func_buf, "%s", msg); } else { - rspamd_common_log_function(rspamd_main->logger, level, func_buf, msg); + rspamd_common_log_function (rspamd_main->logger, level, func_buf, "%s", msg); } } else { if (level == G_LOG_LEVEL_DEBUG) { - rspamd_conditional_debug(rspamd_main->logger, -1, __FUNCTION__, msg); + rspamd_conditional_debug (rspamd_main->logger, -1, __FUNCTION__, "%s", msg); } else { - rspamd_common_log_function(rspamd_main->logger, level, __FUNCTION__, msg); + rspamd_common_log_function (rspamd_main->logger, level, __FUNCTION__, "%s", msg); } } } -- 2.39.5