Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure all trailers security handlers are initialized at parsing time #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Greybird
Copy link

Currently, the Encrypt key is only read for the document trailer.
However, when mutliple trailers are present, the code for reading all indirect objects in ReadAllIndirectObjects can lead to calling IsSecurityHandler method, that can iterate over SecurityHandlers for all previous trailers.
The lazy initialization code will access the Encrypt key under the asumption that it has been read already, leading to an exception.

Unfortunately, I cannot share the file leading to this discovery, sorry for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant