Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5163

Stack overflow when reading a corrupt dictionary

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.23, 3.0.0 PDFBox
    • Fix Version/s: 2.0.24, 3.0.0 PDFBox
    • Component/s: Parsing
    • Labels:
      None

      Description

      Richard Smith/Chaoyuan Peng reported an issue with the current version 2.0.23. When parsing a carefully handcrafted pdf the following exception occurs and PDFBox crashes:

      java.lang.StackOverflowError: null
          java.util.WeakHashMap.eq(Unknown Source)
          java.util.WeakHashMap.get(Unknown Source)
          java.util.Collections$SynchronizedMap.get(Unknown Source)
          org.apache.pdfbox.debugger.ui.LogDialog.log(LogDialog.java:143)
          org.apache.pdfbox.debugger.ui.DebugLog.warn(DebugLog.java:156)
          org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:933)
          org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryValue(BaseParser.java:154)
          org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryNameValuePair(BaseParser.java:283)
          org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionary(BaseParser.java:216)
          org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:859)
          org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:917)
          org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:886)
          org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:806)
          org.apache.pdfbox.pdfparser.COSParser.getLength(COSParser.java:1060)
      

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              lehmi Andreas Lehmkühler

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment