mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
EPS parser: don't index blank lines
This commit is contained in:
parent
883858151d
commit
b885c04388
|
@ -275,13 +275,13 @@ class EpsImageFile(ImageFile.ImageFile):
|
|||
|
||||
s = fp.readline().strip('\r\n')
|
||||
|
||||
if s[0] != "%":
|
||||
if s[:1] != "%":
|
||||
break
|
||||
|
||||
#
|
||||
# Scan for an "ImageData" descriptor
|
||||
|
||||
while s[0] == "%":
|
||||
while s[:1] == "%":
|
||||
|
||||
if len(s) > 255:
|
||||
raise SyntaxError("not an EPS file")
|
||||
|
|
Loading…
Reference in New Issue
Block a user