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

ClassCastException in COSStream.getFilterList

    XMLWordPrintableJSON

    Details

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

      Description

      The attached (broken) PDF throws the following undeclared exception when loaded via Loader.loadPDF (using current Git revision 275c77953ec8c2c896f9085b3508bef2c4d00d2f):

      java.lang.ClassCastException: class org.apache.pdfbox.cos.COSInteger cannot be cast to class org.apache.pdfbox.cos.COSName (org.apache.pdfbox.cos.COSInteger and org.apache.pdfbox.cos.COSName are in unnamed module of loader 'app')
      at org.apache.pdfbox.cos.COSStream.getFilterList(COSStream.java:331)
      at org.apache.pdfbox.cos.COSStream.createView(COSStream.java:186)
      at org.apache.pdfbox.pdfparser.PDFObjectStreamParser.<init>(PDFObjectStreamParser.java:48)
      at org.apache.pdfbox.pdfparser.COSParser.bfSearchForObjStreams(COSParser.java:1643)
      at org.apache.pdfbox.pdfparser.COSParser.rebuildTrailer(COSParser.java:1879)
      at org.apache.pdfbox.pdfparser.COSParser.retrieveTrailer(COSParser.java:263)
      at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:127)
      at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:180)
      at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:154)
      at org.apache.pdfbox.Loader.loadPDF(Loader.java:204)
      at com.example.PdfBoxFuzzer.fuzzerTestOneInput(PdfBoxFuzzer.java:31)

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              Meumertzheim Fabian Meumertzheim
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: