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

Decrypting malformed document with signature cause NPE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.6.0
    • Component/s: Parsing
    • Labels:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: