From: Vsevolod Stakhov Date: Wed, 21 Feb 2018 11:25:19 +0000 (+0000) Subject: [Minor] Fix crash on empty debug module check X-Git-Tag: 1.7.0~158 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8ab5dd791fd53b7d88182cf264bc68221f814e89;p=rspamd.git [Minor] Fix crash on empty debug module check --- diff --git a/src/libutil/logger.c b/src/libutil/logger.c index 6b83ddb05..4d28e28fd 100644 --- a/src/libutil/logger.c +++ b/src/libutil/logger.c @@ -1393,6 +1393,10 @@ rspamd_logger_add_debug_module (const gchar *mname) { struct rspamd_log_module *m; + if (mname == NULL) { + return (guint)-1; + } + if (log_modules == NULL) { log_modules = g_malloc0 (sizeof (*log_modules)); log_modules->modules = g_hash_table_new (rspamd_strcase_hash,