mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-09-24 13:07:00 +03:00
Merge 72c067af29
into 4aef5d0743
This commit is contained in:
commit
852c4c01b4
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -49,7 +49,12 @@ class FliImageFile(ImageFile.ImageFile):
|
||||||
def _open(self) -> None:
|
def _open(self) -> None:
|
||||||
# HEAD
|
# HEAD
|
||||||
s = self.fp.read(128)
|
s = self.fp.read(128)
|
||||||
if not (_accept(s) and s[20:22] == b"\x00\x00"):
|
if not (
|
||||||
|
_accept(s)
|
||||||
|
and s[20:22] == b"\x00" * 2
|
||||||
|
and s[42:80] == b"\x00" * 38
|
||||||
|
and s[88:] == b"\x00" * 40
|
||||||
|
):
|
||||||
msg = "not an FLI/FLC file"
|
msg = "not an FLI/FLC file"
|
||||||
raise SyntaxError(msg)
|
raise SyntaxError(msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user