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

Inconsistent handling of incorrect data

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.18
    • 2.0.19, 3.0.0 PDFBox
    • Rendering
    • Patch

    Description

      We had a PDF that had a strange page with 200Mb+ of text to extract and the deflate function did not work correctly. 

      This created a fatal in PDFBox and I did some debugging and noticed that we handle  SetNonStrokingColorSpace and SetStrokingColorSpace in different ways. One of them had a check if the in data was incorrect and returned and the other one did not have this check.

      I made this small patch that I will include in this issue to rectify this inconsistency.

       

      Added the crashing pdf on my google drive if you want it to test with

      https://drive.google.com/open?id=1bcT27NoqNM-pphYiFCy13bq81potqUc6

       

      Best regards

      Daniel

      Attachments

        1. inconsistant.patch
          1 kB
          Daniel Persson

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              kalaspuffar Daniel Persson
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: