aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_headers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmime/mime_headers.c')
-rw-r--r--src/libmime/mime_headers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c
index a480c6fc6..bb7b9373a 100644
--- a/src/libmime/mime_headers.c
+++ b/src/libmime/mime_headers.c
@@ -1894,7 +1894,9 @@ rspamd_message_set_modified_header (struct rspamd_task *task,
const ucl_object_t *order = ucl_array_find_index (cur, 0),
*value = ucl_array_find_index (cur, 1);
- if (order && value) {
+ if (order && value &&
+ (ucl_object_type (order) == UCL_INT &&
+ ucl_object_type (value) == UCL_STRING)) {
int ord = ucl_object_toint (order);
const char *raw_value;
gsize raw_len;