-
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
Invalid image lookup tables not handled correctly #2110
Comments
@stefan6419846 can you provide the pdf file? |
A reproducing file has been sent to Martin directly for privacy reasons. |
pubpub-zz
added a commit
to pubpub-zz/pypdf
that referenced
this issue
Aug 28, 2023
MartinThoma
pushed a commit
that referenced
this issue
Sep 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Invalid image lookup tables do not seem to be handled correctly and might end up trying to iterate over
None
:pypdf/pypdf/filters.py
Lines 900 to 926 in 89eb626
Here you can see that in line 905 the lookup table will be set to
None
, but both line 908 and lines 915-916 try to iterate over a possiblyNone
value. The condition in line 924 is too late to prevent issues.Environment
Which environment were you using when you encountered the problem?
$ python -m platform Linux-5.14.21-150400.24.81-default-x86_64-with-glibc2.31 $ python -c "import pypdf;print(pypdf.__version__)" 3.15.2
Code + PDF
This is a minimal, complete example that shows the issue:
Traceback
This is the complete traceback I see:
The text was updated successfully, but these errors were encountered: