You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2023/12/23 11:05:00 UTC

[jira] [Resolved] (PDFBOX-5744) EOFException while readMultipleSubstitutionSubtable()

     [ https://issues.apache.org/jira/browse/PDFBOX-5744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-5744.
-------------------------------------
    Resolution: Fixed

> EOFException while readMultipleSubstitutionSubtable()
> -----------------------------------------------------
>
>                 Key: PDFBOX-5744
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5744
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>    Affects Versions: 3.0.2 PDFBox
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 3.0.2 PDFBox, 4.0.0
>
>         Attachments: NotoSerifMyanmar.ttc
>
>
> Another found because of PDFBOX-5743.
> {code:java}
> TrueTypeCollection ttc = new TrueTypeCollection(new File("NotoSerifMyanmar.ttc"));
> ttc.processAllFonts((TrueTypeFont ttf) ->
> {
>     System.out.println(ttf.getName());
> });
> {code}
> {noformat}
> java.io.EOFException: EOF
> 	at org.apache.fontbox.ttf.TTFDataStream.readUnsignedShort(TTFDataStream.java:154)
> 	at org.apache.fontbox.ttf.TTFDataStream.readUnsignedShortArray(TTFDataStream.java:188)
> 	at org.apache.fontbox.ttf.GlyphSubstitutionTable.readMultipleSubstitutionSubtable(GlyphSubstitutionTable.java:561)
> 	at org.apache.fontbox.ttf.GlyphSubstitutionTable.readLookupSubtable(GlyphSubstitutionTable.java:284)
> 	at org.apache.fontbox.ttf.GlyphSubstitutionTable.readLookupTable(GlyphSubstitutionTable.java:451)
> 	at org.apache.fontbox.ttf.GlyphSubstitutionTable.readLookupList(GlyphSubstitutionTable.java:268){code}
> Assuming that such font files are correct, the investigation showed that the table is read several times, i.e. the glyphCount variable was used wrongly.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org