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

Decrypting malformed document with signature cause NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.6.0
    • Parsing
    • None

    Description

      I got a encrypted document that was destroyed by the signer.
      The decrypter can handle it but while searching for signatures, a null check is missing. This cause NPE.

      My patch will cause throw a IOException if something went wrong while decrypting. Another solution is just skipping the object (in my case the referenced object is missing) and continue.

      Maybe a errorhandling for the parser will be a good idea. So the user can decide how importan it is for him to parse a pdf properly and step off if a document isn't conform OR continue and risk to lose some information while parsing malformed documents.

      Attachments

        1. decrypt_NPE_patch.txt
          1 kB
          Thomas Chojecki

        Activity

          People

            lehmi Andreas Lehmkühler
            tchojecki Thomas Chojecki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: