You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2013/10/26 11:32:30 UTC

[jira] [Resolved] (PDFBOX-1749) Out of memory exception when parsing TTF file

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

Andreas Lehmkühler resolved PDFBOX-1749.
----------------------------------------

    Resolution: Fixed

I've fixed the issue in revision 1535953. The parser now detects a premature end of file based on Tilmans comment. I introduced an additional method TTFDataStream#readUnsignedByte to avoid boilerplate code. It throws an exception if it detects a premature EOF.

Thanks for the report and the proposed fix!

> Out of memory exception when parsing TTF file
> ---------------------------------------------
>
>                 Key: PDFBOX-1749
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1749
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>    Affects Versions: 1.8.2
>         Environment: ubuntu
> java version "1.7.0_40"
> Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
> Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
>            Reporter: Erik Hetzner
>            Assignee: Andreas Lehmkühler
>             Fix For: 1.8.3, 2.0.0
>
>         Attachments: 16A4FF_8.ttf, PDFBOX_1749.java
>
>
> When parsing the attached TTF file with fontbox, I get an OutOfMemoryError (heap space) when parsing via an input stream. If I parse via a File, fontbox seems to never return.



--
This message was sent by Atlassian JIRA
(v6.1#6144)