ROB: Fix infinite loop due to Invalid object#1331
Merged
MartinThoma merged 2 commits intopy-pdf:mainfrom Sep 9, 2022
Merged
Conversation
fixes py-pdf#1329 *prevent loop within dictionnaries where objects not respecting standard *fix cmap warnings due to "numbered" characters ( #2d instead of -) *apply unnumbering to nameobject *add _get_indirect_object for debug/dev purpose *add some missing seeks (no issue reported yet)
Codecov Report
@@ Coverage Diff @@
## main #1331 +/- ##
==========================================
- Coverage 94.85% 94.72% -0.14%
==========================================
Files 30 30
Lines 5097 5118 +21
Branches 1049 1052 +3
==========================================
+ Hits 4835 4848 +13
- Misses 153 158 +5
- Partials 109 112 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Collaborator
Author
|
@MartinThoma |
MartinThoma
reviewed
Sep 9, 2022
| if tok == b"/": | ||
| return NameObject.read_from_stream(stream, pdf) | ||
| elif idx == 1: | ||
| elif tok == b"<": |
Member
There was a problem hiding this comment.
Nice that you got rid of ObjectPrefix / idx. It's way easier to read now 👍
Member
|
I'll start my big test suite + release today :-) Thank you for taking care of the issue 🙏 |
MartinThoma
added a commit
that referenced
this pull request
Sep 9, 2022
Robustness (ROB): - Fix infinite loop due to Invalid object (#1331) - Fix image extraction issue with superfluous whitespaces (#1327) Full Changelog: 2.10.5...2.10.6
Member
|
I think I should create a security advisory for this. It was fixed in PyPDF2==2.10.6 |
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.
fixes #1329
NameObject_get_indirect_objectfor debug/dev purpose