From f9528f0ac55da4ce2ef904dc10760012a68ae75a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 13 Dec 2023 15:57:28 +0100 Subject: fw-addr-lists: warn on possible truncation ... as fetch truncates data at about 64kB, reported in SUP-132297. --- fw-addr-lists.rsc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fw-addr-lists.rsc b/fw-addr-lists.rsc index 845b597..34a06bc 100644 --- a/fw-addr-lists.rsc +++ b/fw-addr-lists.rsc @@ -16,6 +16,7 @@ :global CertificateAvailable; :global EitherOr; :global LogPrintExit2; +:global LogPrintOnce; :global ScriptLock; :global WaitFullyConnected; @@ -72,6 +73,10 @@ $WaitFullyConnected; $LogPrintExit2 warning $0 ("Failed downloading list from: " . $List->"url") false; } + :if ([ :len $Data ] > 63000) do={ + $LogPrintOnce warning $0 ("The list is huge and may be truncated: " . $List->"url"); + } + :while ([ :len $Data ] != 0) do={ :local Line [ :pick $Data 0 [ :find $Data "\n" ] ]; :local Address ([ :pick $Line 0 [ $FindDelim $Line ] ] . ($List->"cidr")); -- cgit v1.2.3-70-g09d2