mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
Track IndirectReference instead of only ObjectNumber when checking for cycles during indirect reference resolutionv and add test
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user