Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.0 PDFBox
-
None
-
Mac OS 12.1 & Ubuntu Linux 16.04 (4.15.0-163-generic)
Description
Hi, I found a crafted pdf that can trigger an infinite loop while parsing using PDFBOX. I have tested on the latest commit of PDFBOX on Github.
This bug can be triggered by the following code.
```
File ff = new File("path/to/the/sample");
PDDocument document = Loader.loadPDF(ff);
```
I found that the root cause of this infinite loop resides in the while-loop at line 321 of COSParse.java.]. When parsing the provided PDF files, the variable $prev is never changed during this loop.