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.