mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
Prevent StackOverflow in ParseTrailer and fix #1122
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
|
||||
public class GithubIssuesTests
|
||||
{
|
||||
[Fact]
|
||||
public void Issue1122()
|
||||
{
|
||||
var path = IntegrationHelpers.GetSpecificTestDocumentPath("StackOverflow_Issue_1122.pdf");
|
||||
|
||||
var ex = Assert.Throws<PdfDocumentFormatException>(() => PdfDocument.Open(path, new ParsingOptions() { UseLenientParsing = true }));
|
||||
Assert.StartsWith("Reached maximum search depth while getting indirect reference.", ex.Message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Issue1096()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user