Skip to content

Commit

Permalink
PDFBOX-5817: detect extreme componentCount value
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1917593 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed May 9, 2024
1 parent 3188e7b commit 0651078
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,11 @@ private LigatureTable readLigatureTable(TTFDataStream data, long ligatureTableLo
int ligatureGlyph = data.readUnsignedShort();

int componentCount = data.readUnsignedShort();
if (componentCount > 100)
{
throw new IOException("componentCount in ligature table is " +
componentCount + ", font likely corrupt");
}

int[] componentGlyphIDs = new int[componentCount];

Expand Down

0 comments on commit 0651078

Please sign in to comment.