summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/spf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spf.c b/src/spf.c
index 7a8de6746..ee8a4118f 100644
--- a/src/spf.c
+++ b/src/spf.c
@@ -1087,7 +1087,7 @@ resolve_spf (struct worker_task *task, spf_cb_t callback)
rec->task = task;
rec->callback = callback;
- if (task->from && (domain = strchr (task->from, '@'))) {
+ if (task->from && (domain = strchr (task->from, '@')) != NULL && *domain == '@') {
rec->sender = task->from;
rec->local_part = memory_pool_strdup (task->task_pool, task->from);