We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b36a564 commit db1e458Copy full SHA for db1e458
1 file changed
PyPDF2/pdf.py
@@ -1820,12 +1820,12 @@ def read(self, stream):
1820
stream.seek(-1, 2)
1821
if not stream.tell():
1822
raise PdfReadError('Cannot read an empty file')
1823
- last1K = stream.tell() - 1024 + 1 # offset of last 1024 bytes of stream
+ last1M = stream.tell() - 1024 * 1024 + 1 # offset of last MB of stream
1824
line = b_('')
1825
while line[:5] != b_("%%EOF"):
1826
- if stream.tell() < last1K:
+ if stream.tell() < last1M:
1827
raise PdfReadError("EOF marker not found")
1828
- line = self.readNextEndLine(stream, last1K)
+ line = self.readNextEndLine(stream)
1829
if debug: print(" line:",line)
1830
1831
# find startxref entry - the location of the xref table
0 commit comments