Track IndirectReference instead of only ObjectNumber when checking for cycles during indirect reference resolutionv and add test

This commit is contained in:
BobLd
2025-07-20 18:27:51 +01:00
parent 2b11961c8c
commit 813d3baa18
3 changed files with 25 additions and 4 deletions

View File

@@ -7,6 +7,27 @@
public class GithubIssuesTests
{
[Fact]
public void Issue1096()
{
// Ensure no StackOverflowException
// (already fixed by https://github.com/UglyToad/PdfPig/pull/1097)
var path = IntegrationHelpers.GetSpecificTestDocumentPath("issue_1096.pdf");
using (var document = PdfDocument.Open(path, new ParsingOptions() { UseLenientParsing = true }))
{
for (int p = 1; p <= document.NumberOfPages; p++)
{
var page = document.GetPage(p);
foreach (var image in page.GetImages())
{
Assert.NotNull(image);
}
}
}
}
[Fact]
public void Issue1067()
{