From 568bfe429932d2a8930a9effd43a633d2bc9ea77 Mon Sep 17 00:00:00 2001 From: Ruby Martin Date: Tue, 14 Jul 2026 11:27:53 -0600 Subject: [PATCH] limit extLen to MAX_RECORD_SIZE --- tests/api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/api.c b/tests/api.c index 7cf9225e49..959634a000 100644 --- a/tests/api.c +++ b/tests/api.c @@ -15038,6 +15038,9 @@ static int ech_find_extension(byte* buf, word16* idx_p, word16 extType) if (seekRet < 0) { return seekRet; } + if (extLen > MAX_RECORD_SIZE) { + return BAD_FUNC_ARG; + } idx = extIdx = ((word16)seekRet + *idx_p); while (idx - extIdx < extLen) {