]> source.dussan.org Git - rspamd.git/commitdiff
Make lua logger format safe.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 24 Aug 2012 12:08:56 +0000 (16:08 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 24 Aug 2012 12:08:56 +0000 (16:08 +0400)
src/lua/lua_common.c

index f3a33a7d23ef6bb3c9fba3da53435b4fdc8e5f76..818073dc8f5a593c79fdbe4a1cc91eefdee68278 100644 (file)
@@ -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);
                }
        }
 }