]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix crash on empty debug module check
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Feb 2018 11:25:19 +0000 (11:25 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Feb 2018 11:25:19 +0000 (11:25 +0000)
src/libutil/logger.c

index 6b83ddb0574aa2407412b1909e8c14f4ac53cc6a..4d28e28fd322ffaa6a7f060b93510e2c91171c15 100644 (file)
@@ -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,