[ 
https://issues.apache.org/jira/browse/PDFBOX-5744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17800032#comment-17800032
 ] 

ASF subversion and git services commented on PDFBOX-5744:
---------------------------------------------------------

Commit 1914886 from Tilman Hausherr in branch 'pdfbox/branches/3.0'
[ https://svn.apache.org/r1914886 ]

PDFBOX-5744: remove SequenceTable getting read glyphCount times

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to