Skip to content

Commit 6a63b13

Browse files
author
m32
committed
#157 - vulnerability in used pypdf
1 parent 196898c commit 6a63b13

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

endesive/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
__author__ = 'Grzegorz Makarewicz'
44
__license__ = 'MIT'
5-
__version__ = '2.16'
5+
__version__ = '2.16.1'
66

77
__all__ = [__author__, __license__, __version__]

endesive/pdf/PyPDF2/pdf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ def _pairs(self, array):
20002000
def readNextEndLine(self, stream):
20012001
debug = False
20022002
if debug: print(">>readNextEndLine")
2003-
line = b_("")
2003+
line_parts = []
20042004
while True:
20052005
# Prevent infinite loops in malformed PDFs
20062006
if stream.tell() == 0:
@@ -2027,10 +2027,10 @@ def readNextEndLine(self, stream):
20272027
break
20282028
else:
20292029
if debug: print(" x is neither")
2030-
line = x + line
2031-
if debug: print((" RNEL line:", line))
2030+
line_parts.append(x)
20322031
if debug: print("leaving RNEL")
2033-
return line
2032+
line_parts.reverse()
2033+
return b"".join(line_parts)
20342034

20352035
def decrypt(self, password):
20362036
"""

0 commit comments

Comments
 (0)