From cbd6eebecc2e0931b605c504f6bc00b9fde3bcb3 Mon Sep 17 00:00:00 2001 From: Eliot Jones Date: Thu, 26 Nov 2020 21:23:40 -0400 Subject: [PATCH] up brute force range to 10mib #233 previously this was 1mib but the search range was exceeded in a file with over 1 million bytes of xref table. --- src/UglyToad.PdfPig/Parser/Parts/BruteForceSearcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UglyToad.PdfPig/Parser/Parts/BruteForceSearcher.cs b/src/UglyToad.PdfPig/Parser/Parts/BruteForceSearcher.cs index ee5abca5..2dda4ecc 100644 --- a/src/UglyToad.PdfPig/Parser/Parts/BruteForceSearcher.cs +++ b/src/UglyToad.PdfPig/Parser/Parts/BruteForceSearcher.cs @@ -46,7 +46,7 @@ do { - if (loopProtection > 1_000_000) + if (loopProtection > 10_000_000) { throw new PdfDocumentFormatException("Failed to brute-force search the file due to an infinite loop."); }