aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_headers.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-03-01 10:34:07 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-03-01 10:34:07 +0000
commitb14e9419ca91f289fa717ce27da99819197ee57f (patch)
tree962af802f1b9d95c7146f731aee2bc3a0890b186 /src/libmime/mime_headers.c
parent0a82f42bc508f90d9f23a6a2e087495c04b1a2a5 (diff)
downloadrspamd-b14e9419ca91f289fa717ce27da99819197ee57f.tar.gz
rspamd-b14e9419ca91f289fa717ce27da99819197ee57f.zip
[Minor] Fix issues with values check
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;