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 2010/05/06 20:14:49 UTC
[jira] Resolved: (PDFBOX-703) Null pointer Exception with
org.apache.fontbox.cff.CFFParser$DictData.getEntry(CFFParser.java:626)
[ https://issues.apache.org/jira/browse/PDFBOX-703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler resolved PDFBOX-703.
---------------------------------------
Fix Version/s: 1.2.0
Resolution: Fixed
I've applied the patch with version 941835
Thanks to Peter for the contribution.
> Null pointer Exception with org.apache.fontbox.cff.CFFParser$DictData.getEntry(CFFParser.java:626)
> --------------------------------------------------------------------------------------------------
>
> Key: PDFBOX-703
> URL: https://issues.apache.org/jira/browse/PDFBOX-703
> Project: PDFBox
> Issue Type: Bug
> Components: FontBox
> Environment: Not an issue,
> Reporter: Peter_Lenahan@ibi.com
> Priority: Minor
> Fix For: 1.2.0
>
> Attachments: PDFBOX-703-CFFParser-nullpointerexception-patch.txt
>
>
> The code doesn't crash, however there are a lot of stack dumps in the log file.
> The 4 entry in the array below has a null for an operator
> org.apache.fontbox.cff.CFFParser$DictData$Entry[operands=[-18, 18, 608, 18, -248, 16, 262, 10], operator=BlueValues],
> org.apache.fontbox.cff.CFFParser$DictData$Entry[operands=[240, 2, 114, 0, -576, 0], operator=OtherBlues],
> org.apache.fontbox.cff.CFFParser$DictData$Entry[operands=[0.0479583], operator=BlueScale],
> org.apache.fontbox.cff.CFFParser$DictData$Entry[operands=[0.06], operator=null],
> org.apache.fontbox.cff.CFFParser$DictData$Entry[operands=[278], operator=defaultWidthX],
> org.apache.fontbox.cff.CFFParser$DictData$Entry[operands=[551], operator=nominalWidthX], null, null, null, null
> In the file org.apache.fontbox.cff.CFFParser.java:626 it fails to test for a null operator.
> I am not sure if the data is incorrect or if the code should just test for a null pointer exception.
> - Failed to create Type1C font. Falling back to Type1 font
> java.lang.NullPointerException
> at org.apache.fontbox.cff.CFFParser$DictData.getEntry(CFFParser.java:626)
> at org.apache.fontbox.cff.CFFParser$DictData.getEntry(CFFParser.java:619)
> at org.apache.fontbox.cff.CFFParser.getDelta(CFFParser.java:414)
> at org.apache.fontbox.cff.CFFParser.parseFont(CFFParser.java:358)
> at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:66)
> Proposed fix would be to test for a null operator and stop the crash.
> private Entry getEntry(CFFOperator operator)
> {
> for (Entry entry : entries)
> {
> // Check for null entry before comparing the Font
> //
> if (entry != null && entry.operator != null &&
> entry.operator.equals(operator))
> {
> return entry;
> }
> }
> return null;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.