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

COSParser.parseXref failing if startXrefOffset over pdf size

    Details

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

      Description

      Any PDF which had wrong startxref was parsed with warning in PdfBox 1.8 thanks to self healing mechanism.

      In version 2.0 the COSParser.parseXref (called from PDFParser) tries to seek to the startxref position.

      If the position is wrong, but within the file size, the PDF is parsed with warning.
      But when the startxref is over the file size, the parsing ended with exception.

      We could either test if startxref is not over source.length(), or catch the exception.

        Attachments

        1. 000369.pdf
          11 kB
          Tilman Hausherr

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              backslash47 Matus Zamborsky
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: