-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ROB: Fix infinite loop due to Invalid object #1331
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. |
@MartinThoma |
return NameObject.read_from_stream(stream, pdf) | ||
elif idx == 1: | ||
elif tok == b"<": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that you got rid of ObjectPrefix / idx. It's way easier to read now 👍
I'll start my big test suite + release today :-) Thank you for taking care of the issue 🙏 |
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
I think I should create a security advisory for this. It was fixed in PyPDF2==2.10.6 |
fixes #1329
NameObject
_get_indirect_object
for debug/dev purpose