Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.25
-
None
-
None
Description
On some broken PDFs call PDSignature.getSignedContent never returns.
After exploring stacktrace I've found cycle in COSFilterInputStream.nextRange.
while (this.position < this.ranges[this.range][0]) { long skipped = super.skip(this.ranges[this.range][0] - this.position); this.position += skipped; }
Javadoc for skip says "The skip method may, for a variety ofreasons, end up skipping over some smaller number of bytes, possibly 0."
So, when skip returns 0 this cycle became infinite.
Tried in versions 2.0.25 and 3.0.0-RC1.