pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4372) Stack overflow around PDFStreamEngine.processStream
Date Thu, 08 Nov 2018 17:24:01 GMT

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

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

Commit 1846173 from tilman@apache.org in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1846173 ]

PDFBOX-4372: return empty resources if resource key does exist but doesn't contain a dictionary,
to avoid stack overflow when form contains reference to form with its own name

> Stack overflow around PDFStreamEngine.processStream
> ---------------------------------------------------
>
>                 Key: PDFBOX-4372
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4372
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.8.16, 2.0.12
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 1.8.17, 2.0.13, 3.0.0 PDFBox
>
>         Attachments: PDFBOX-4372-2DAYCLVOFG3FTVO4RMAJJL3VTPNYDFRO-p4_reduced.pdf, PDFBOX-4372-2DAYCLVOFG3FTVO4RMAJJL3VTPNYDFRO.pdf
>
>
> {noformat}
> java.lang.StackOverflowError: null
>     java.lang.ref.Finalizer.<init>(Unknown Source)
>     java.lang.ref.Finalizer.register(Unknown Source)
>     java.lang.Object.<init>(Unknown Source)
>     java.util.zip.Inflater.<init>(Unknown Source)
>     org.apache.pdfbox.filter.FlateFilter.decompress(FlateFilter.java:74)
>     org.apache.pdfbox.filter.FlateFilter.decode(FlateFilter.java:50)
>     org.apache.pdfbox.filter.Filter.decode(Filter.java:87)
>     org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:77)
>     org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:178)
>     org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:166)
>     org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject.getContents(PDFormXObject.java:144)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:495)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:478)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:187)
>     org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:70)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:478)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:187)
>     org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:70)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:478)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:187)
>     org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:70)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:478)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:187)
>     org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:70)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:478)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:187)
>     org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:70)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:478)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:187)
>     org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:70)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:478)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:187)
>     org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:70)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:478)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:187)
>     org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:70)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:478)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:187)
> ...
> {noformat}
> The cause is that one of the form XObjects has a resource entry but that is null. So
in PDFStreamEngine the parent resources is used. This results that form Fm0, which has "/Fm0
Do", references itself.
> The solution for now is to return an empty resouces instead of null when the key exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message