aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/scan_result.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-18 12:14:54 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-18 12:14:54 +0000
commite7059c97ee940941455a1d0b8fe0adb292ce8d7c (patch)
treebe85ba6ecefdf35677568d2b48d93e5eccd466b8 /src/libmime/scan_result.c
parent677173f90b0df5d54d29734d0f46799a85787544 (diff)
downloadrspamd-e7059c97ee940941455a1d0b8fe0adb292ce8d7c.tar.gz
rspamd-e7059c97ee940941455a1d0b8fe0adb292ce8d7c.zip
[Fix] Fix utf8 validation for symbols options and empty strings
Diffstat (limited to 'src/libmime/scan_result.c')
-rw-r--r--src/libmime/scan_result.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/scan_result.c b/src/libmime/scan_result.c
index 7b1acd3e9..23964c88e 100644
--- a/src/libmime/scan_result.c
+++ b/src/libmime/scan_result.c
@@ -529,7 +529,7 @@ rspamd_task_add_result_option (struct rspamd_task *task,
vlen = strlen (val);
- if (!rspamd_fast_utf8_validate (val, vlen)) {
+ if (rspamd_fast_utf8_validate (val, vlen) == 0) {
opt_cpy = rspamd_str_make_utf_valid (val, vlen, &vlen,
task->task_pool);
val = opt_cpy;