]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Correctly handle arrays when reading mime_types.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 Sep 2015 12:05:58 +0000 (13:05 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 Sep 2015 12:05:58 +0000 (13:05 +0100)
src/plugins/fuzzy_check.c

index ef10056e5fba3b3f80c430b481d8e44504bd095a..a2e03a16d76717b4c613dc4b290b9d7092ca2839 100644 (file)
@@ -316,7 +316,7 @@ fuzzy_parse_rule (struct rspamd_config *cfg, const ucl_object_t *obj, gint cb_id
 
        if ((value = ucl_object_find_key (obj, "mime_types")) != NULL) {
                it = NULL;
-               while ((cur = ucl_iterate_object (value, &it, obj->type == UCL_ARRAY))
+               while ((cur = ucl_iterate_object (value, &it, value->type == UCL_ARRAY))
                                != NULL) {
                        rule->mime_types = g_list_concat (rule->mime_types,
                                        parse_mime_types (ucl_obj_tostring (cur)));