Petr Slaby created PDFBOX-2985:
----------------------------------

             Summary: Potential NPE in PDMarkedContent#getMCID()
                 Key: PDFBOX-2985
                 URL: https://issues.apache.org/jira/browse/PDFBOX-2985
             Project: PDFBox
          Issue Type: Bug
            Reporter: Petr Slaby


I do not have a test case, but this method in PDMarkedContent is obviously 
wrong:

{noformat}
    public int getMCID()
    {
        return this.getProperties() == null ? null :
            this.getProperties().getInt(COSName.MCID);
    }
{noformat}

if getProperties() is null, the method tries to convert null Integer value to 
an int. I believe the intention was rather:
{noformat}
...
        return this.getProperties() == null ? 0 :
...
{noformat}






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to