From 3c676fa8fedeee3b6e775c9d81c9fc79e8d65e7f Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 7 Apr 2018 22:44:39 +0100 Subject: [PATCH] ARC: fix verify to not evaluate the top AMS twice --- src/src/arc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/src/arc.c b/src/src/arc.c index dedf64c44..39c081193 100644 --- a/src/src/arc.c +++ b/src/src/arc.c @@ -760,7 +760,6 @@ arc_headers_check(arc_ctx * ctx) arc_set * as; int inst; BOOL ams_fail_found = FALSE; -uschar * ret = NULL; if (!(as = ctx->arcset_chain)) return US"none"; @@ -792,20 +791,20 @@ for(inst = 0; as; as = as->next) arc_received = ctx->arcset_chain_last; arc_received_instance = inst; -if (ret) - return ret; /* We can skip the latest-AMS validation, if we already did it. */ as = ctx->arcset_chain_last; -if (as->ams_verify_done && !as->ams_verify_passed) +if (!as->ams_verify_passed) { - arc_state_reason = as->ams_verify_done; - return US"fail"; + if (as->ams_verify_done) + { + arc_state_reason = as->ams_verify_done; + return US"fail"; + } + if (!!arc_ams_verify(ctx, as)) + return US"fail"; } -if (!!arc_ams_verify(ctx, as)) - return US"fail"; - return NULL; } -- 2.25.1