pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (PDFBOX-2047) read operations alter PDLab object
Date Fri, 02 May 2014 08:41:15 GMT

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

Tilman Hausherr edited comment on PDFBOX-2047 at 5/2/14 8:39 AM:
-----------------------------------------------------------------

Done in rev 1590878 for the 1.8 branch.


was (Author: tilman):
Done in rev 1590878 for the 1.8 branch. Will set to resolve after the 1.8.5 release (which
will not include this change).

> read operations alter PDLab object
> ----------------------------------
>
>                 Key: PDFBOX-2047
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2047
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.8.4, 1.8.5, 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>             Fix For: 1.8.6, 2.0.0
>
>
> This is a follow-up to PDFBOX-2042 but for PDLab: "A read operation must not alter the
pdf." 
> The problem described PDFBOX-2042 happened because the constructor called loadICCProfile(),
which called getRangeForComponent(c), which altered its own object with (broken) default values.
PDLab has no such constructor so Jurajs test won't show any problem, but this different test
will:
> {code}
>         PDLab pdLab = new PDLab();
>         COSArray cosArray = (COSArray) pdLab.getCOSObject();
>         COSDictionary dict = (COSDictionary)cosArray.getObject(1);
>         pdLab.getBlackPoint();
>         pdLab.getWhitepoint();
>         pdLab.getARange();
>         pdLab.getBRange();
>         assertEquals("read operations should not change the size of /Lab objects", 0,
dict.size());
>         dict.toString(); // rev 1571125 does stack overflow here in 2.0
> {code}
> removing the assert brings a stack overflow.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message