Gitweb:
https://git.exim.org/exim.git/commitdiff/ef262e3170d26e4203fbf259180a34b1c0228a32
Commit: ef262e3170d26e4203fbf259180a34b1c0228a32
Parent: 0d7bb78a322846918f2190c525adacb0cddeeb5b
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Tue Apr 24 13:07:53 2018 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Tue Apr 24 13:07:53 2018 +0100
ARC: limit verify chain to 50-deep
---
src/src/arc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/src/arc.c b/src/src/arc.c
index ddf7395..53d06de 100644
--- a/src/src/arc.c
+++ b/src/src/arc.c
@@ -382,7 +382,7 @@ static uschar *
arc_insert_hdr(arc_ctx * ctx, header_line * h, unsigned off, unsigned hoff,
BOOL instance_only)
{
-int i;
+unsigned i;
arc_set * as;
arc_line * al = store_get(sizeof(arc_line)), ** alp;
uschar * e;
@@ -395,6 +395,7 @@ if ((e = arc_parse_line(al, h, off, instance_only)))
return US"line parse";
}
if (!(i = arc_instance_from_hdr(al))) return US"instance find";
+if (i > 50) return US"overlarge instance number";
if (!(as = arc_find_set(ctx, i))) return US"set find";
if (*(alp = (arc_line **)(US as + hoff))) return US"dup hdr";