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

Object offsets should be of type long + PATCH

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.6.0
    • 1.7.0
    • Parsing
    • None

    Description

      Currently object offsets are stored as integer (32 bit). However the PDF specification does not limit a PDF document to 2GB. The only restriction is the XREF table which supports 10 digit values for object offsets. Thus we could have offsets >2GB (<10GB). The attached patch changes all locations (as far as I could find them) dealing with object offsets to long type.
      Since this is a rather small change which should not have greater performance/space impact I recommend to include it. Otherwise we would have to include checks that the parsed file is smaller then Integer.MAX_VALUE.

      Attachments

        Issue Links

          Activity

            People

              lehmi Andreas Lehmkühler
              tboehme Timo Boehme
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: