mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-17 18:54:46 +03:00
Merge e273ab04dc
into badbff1b99
This commit is contained in:
commit
68ae21ef50
|
@ -449,7 +449,9 @@ def isOleFile(filename):
|
||||||
header = filename.read(len(MAGIC))
|
header = filename.read(len(MAGIC))
|
||||||
# just in case, seek back to start of file:
|
# just in case, seek back to start of file:
|
||||||
filename.seek(0)
|
filename.seek(0)
|
||||||
elif isinstance(filename, bytes) and len(filename) >= MINIMAL_OLEFILE_SIZE:
|
elif isinstance(filename, bytes):
|
||||||
|
if len(filename) < MINIMAL_OLEFILE_SIZE:
|
||||||
|
return False
|
||||||
# filename is a bytes string containing the OLE file to be parsed:
|
# filename is a bytes string containing the OLE file to be parsed:
|
||||||
header = filename[:len(MAGIC)]
|
header = filename[:len(MAGIC)]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user