diff --git a/opendkim/opendkim-ar.c b/opendkim/opendkim-ar.c index eb9d96ab..002fdb6c 100644 --- a/opendkim/opendkim-ar.c +++ b/opendkim/opendkim-ar.c @@ -454,7 +454,7 @@ ares_parse(u_char *hdr, struct authres *ar) if (tokens[c][0] == ';') { prevstate = state; - state = 3; + state = 14; } else if (isascii(tokens[c][0]) && isdigit(tokens[c][0])) @@ -479,10 +479,20 @@ ares_parse(u_char *hdr, struct authres *ar) return -1; prevstate = state; - state = 3; + state = 14; break; + case 14: /* method or "none" */ + if (strcasecmp((char *) tokens[c], "none") == 0) + { + prevstate = state; + state = 15; + continue; + } + + /* FALLTHROUGH */ + case 3: /* method */ if (n == 0 || !ares_dedup(ar, n)) n++; @@ -651,6 +661,10 @@ ares_parse(u_char *hdr, struct authres *ar) state = 9; break; + + case 15: /* terminal state after no-result */ + /* no token should not appear */ + return -1; } }