Correct improper decryption of PDFStream object in Adobe Digital Edition PDF#935
Open
LugubriousProphecy wants to merge 3 commits intonoDRM:masterfrom
Open
Correct improper decryption of PDFStream object in Adobe Digital Edition PDF#935LugubriousProphecy wants to merge 3 commits intonoDRM:masterfrom
LugubriousProphecy wants to merge 3 commits intonoDRM:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The original code fails to decrypt the dictionary object within the stream object, decrypting only the data contained within the stream and not the remaining dictionary portion of the stream object. This leads to improper decryption of images with an Indexed colorspace where the lookup table is stored as an encrypted string within the dictionary of the stream object.
This change allows the decryption of the remaining data within the stream object , stored as a dictionary, and fixes the color issue that plagued encrypted PDFs with Indexed images.
The impetus for correcting this came from a PDF with images whose color was corrupted, but there may be other cases where issues have arisen due to significant information within the stream object not being properly decrypted. This change applies to the stream object and will resolve issues in those cases as well.