Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.0, 2.0.1, 2.0.2, 3.0.0 PDFBox
-
None
Description
When using TrueTypeFont::getKerning there is a large possibility that you will run into an out of bounds exception. This is because the binary search is split into two parts, and the second part incorrectly adds the offset to the found index.
Actually, with the current implementation there is no need to split the search into two parts. This is only 'needed' when using a binary search implementation which is optimised for cases where the length of the array is a power of two, which Arrays::binarySearch doesn't implement.
Attachments
Attachments
Issue Links
- is duplicated by
-
PDFBOX-3554 Crash in kerning calculations
- Closed
- relates to
-
PDFBOX-2806 The 'kern' table type is not supported.
- Closed