PDFsharp
PDFsharp copied to clipboard
Parser.ReadTrailer Bug leads the parser to hang indefinitely.
Hey, i found a parsing issue in the PdfReader.Parse which causes the parser to hang indefinitely, specifically in the Parser.ReadTrailer and more specifically in the ReadSize call, didn't really dig deeper into the issue itself though.
Expected Behavior
The reader throws an exception since the PDF is not valid.
Actual Behavior
The parser hangs indefinitely.
Steps to Reproduce the Behavior
Use PdfReader.Open on the following PDF:
which will cause the parser to hang.
Found via BinarySploit Framework Fuzzing component (A project i'm still working on)
Thanks for the feedback. I can replicate the issue.