From: Vsevolod Stakhov Date: Fri, 11 Sep 2015 12:05:58 +0000 (+0100) Subject: Correctly handle arrays when reading mime_types. X-Git-Tag: 1.0.0~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=16e1e48f051ce709011c1930d9c7dea25915b847;p=thirdparty%2Frspamd.git Correctly handle arrays when reading mime_types. --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index ef10056e5f..a2e03a16d7 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -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)));