summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-04-07 22:44:39 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2018-04-07 22:44:39 +0100
commit3c676fa8fedeee3b6e775c9d81c9fc79e8d65e7f (patch)
tree6986951515f58f0fa5529e89f87da9f97491d215
parentd342446f29e81eddd4845cbf23e9454b9fc406e2 (diff)
ARC: fix verify to not evaluate the top AMS twiceexim-4_91_RC4
-rw-r--r--src/src/arc.c17
1 files 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;
}