diff options
-rw-r--r-- | src/libserver/spf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libserver/spf.c b/src/libserver/spf.c index aa14bc750..372b20189 100644 --- a/src/libserver/spf.c +++ b/src/libserver/spf.c @@ -1973,12 +1973,15 @@ start_spf_parse (struct spf_record *rec, struct spf_resolved_element *resolved, gchar *begin) { gchar **elts, **cur_elt; + gsize len; /* Skip spaces */ while (g_ascii_isspace (*begin)) { begin++; } + len = strlen (begin); + if (g_ascii_strncasecmp (begin, SPF_VER1_STR, sizeof (SPF_VER1_STR) - 1) == 0) { begin += sizeof (SPF_VER1_STR) - 1; @@ -2006,8 +2009,9 @@ start_spf_parse (struct spf_record *rec, struct spf_resolved_element *resolved, "<%s>: spf error for domain %s: bad spf record start: %*s", rec->task->message_id, rec->sender_domain, - (gint)sizeof (SPF_VER1_STR) - 1, + (gint)len, begin); + return FALSE; } |