summaryrefslogtreecommitdiffstats
path: root/src/plugins/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-10-25 21:20:49 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-10-25 21:20:49 +0400
commit2e15cacc80101d91108be8aaa4ea722f31d22d6b (patch)
tree1bed5d6b92159cf3f5421307b7c7ae096475cc29 /src/plugins/regexp.c
parent88f4ea9a5b1e55169fa23ad2b7ffe7985fb8c3ed (diff)
downloadrspamd-2e15cacc80101d91108be8aaa4ea722f31d22d6b.tar.gz
rspamd-2e15cacc80101d91108be8aaa4ea722f31d22d6b.zip
Do not try to validate empty headers.
Write symbols to log in case of HTTP/Json output.
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r--src/plugins/regexp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index e4eb82398..77c67015c 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -698,7 +698,7 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task, const gchar
/* Try to match regexp */
if (!re->is_raw) {
/* Validate input */
- if (!g_utf8_validate (cur->data, -1, NULL)) {
+ if (!cur->data || !g_utf8_validate (cur->data, -1, NULL)) {
cur = g_list_next (cur);
continue;
}
@@ -923,7 +923,7 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task, const gchar
/* Try to match regexp */
if (!re->is_raw) {
/* Validate input */
- if (!g_utf8_validate (rh->value, -1, NULL)) {
+ if (!rh->value || !g_utf8_validate (rh->value, -1, NULL)) {
cur = g_list_next (cur);
continue;
}