]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Do not add maps from weird data
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 17 Nov 2016 13:03:36 +0000 (13:03 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 17 Nov 2016 13:04:10 +0000 (13:04 +0000)
Issue: #1143
Reported by: @AlexeySa

src/libutil/map.c

index f240e5f8462d10a151459c183e87156aad3fabaa..eaaea4ac05623b974ffc2aeb9ef510a18c45e7e0 100644 (file)
@@ -1666,6 +1666,11 @@ rspamd_map_add_from_ucl (struct rspamd_config *cfg,
                        goto err;
                }
        }
+       else {
+               msg_err_config ("map has invalid type for value: %s",
+                               ucl_object_type_to_string (ucl_object_type (obj)));
+               goto err;
+       }
 
        rspamd_map_calculate_hash (map);
        msg_info_map ("added map from ucl");