You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invalid parent xref., rebuild xref
Object 9 0 not defined.
Traceback (most recent call last):
File "/fuzz/./poc.py", line 18, in <module>
TestOneInput(sys.argv[1])
File "/fuzz/./poc.py", line 10, in TestOneInput
for page_number, page in enumerate(pdf_reader.pages):
File "/usr/local/lib/python3.9/dist-packages/pypdf/_page.py", line 2425, in __iter__
for i in range(len(self)):
File "/usr/local/lib/python3.9/dist-packages/pypdf/_page.py", line 2356, in __len__
return self.length_function()
File "/usr/local/lib/python3.9/dist-packages/pypdf/_doc_common.py", line 352, in get_num_pages
self._flatten()
File "/usr/local/lib/python3.9/dist-packages/pypdf/_doc_common.py", line 1101, in _flatten
pages = catalog["/Pages"].get_object() # type: ignore
AttributeError: 'NoneType' object has no attribute 'get_object'
The text was updated successfully, but these errors were encountered:
Hi!
I've found another broken pdf that causes a crash in PdfReader. The necessary information to reproduce one of them is provided below.
Environment
Which environment were you using when you encountered the problem?
upd. commit b7b3c8c
Code + PDF
This is a minimal, complete example that shows the issue:
PoC
crash-7e1356f1179b4198337f282304cb611aea26a199.pdf
Traceback
This is the complete stderr I see:
The text was updated successfully, but these errors were encountered: