From 51f5fa9a452ad5b240bc0415e12ac46bcb131bfe Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 16 Oct 2026 18:04:17 -0400 Subject: [PATCH] stop parsing HTTP header if next line is too long --- libi2pd_client/I2PTunnel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libi2pd_client/I2PTunnel.cpp b/libi2pd_client/I2PTunnel.cpp index 3e73be57..70ceb88c 100644 --- a/libi2pd_client/I2PTunnel.cpp +++ b/libi2pd_client/I2PTunnel.cpp @@ -423,6 +423,12 @@ namespace client } else { + if (line.length () > I2P_TUNNEL_HTTP_MAX_HEADER_SIZE) + { + LogPrint (eLogError, "I2PTunnel: HTTP header line exceeds max size ", I2P_TUNNEL_HTTP_MAX_HEADER_SIZE); + Terminate (); + return; + } // insert incomplete line back m_InHeader.clear (); m_InHeader << line;