mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-17 18:54:46 +03:00
Merge 70c5367c33
into badbff1b99
This commit is contained in:
commit
3b5f4b8684
|
@ -453,6 +453,9 @@ def isOleFile(filename):
|
|||
# filename is a bytes string containing the OLE file to be parsed:
|
||||
header = filename[:len(MAGIC)]
|
||||
else:
|
||||
if len(filename) < MINIMAL_OLEFILE_SIZE:
|
||||
return False
|
||||
|
||||
# string-like object: filename of file on disk
|
||||
header = open(filename, 'rb').read(len(MAGIC))
|
||||
if header == MAGIC:
|
||||
|
|
Loading…
Reference in New Issue
Block a user