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] [Created] (PDFBOX-4372) Stack overflow around PDFStreamEngine.processStream
Date Thu, 08 Nov 2018 17:19:00 GMT
Tilman Hausherr created PDFBOX-4372:
---------------------------------------

             Summary: 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: 2.0.12, 1.8.16
            Reporter: Tilman Hausherr
            Assignee: Tilman Hausherr
             Fix For: 1.8.17, 2.0.13, 3.0.0 PDFBox


{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