mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 20:27:06 +03:00
Change max token size to 10
- ...so as not to reject "2,147,483,647" (2 ** 31 - 1); - reword exception message.
This commit is contained in:
parent
bc5ecfb79c
commit
50522d932e
|
@ -87,8 +87,8 @@ class PpmImageFile(ImageFile.ImageFile):
|
|||
if c in B_WHITESPACE: # token ended
|
||||
break
|
||||
token += c
|
||||
if len(token) > 9:
|
||||
raise ValueError(f"Token too long: {token}")
|
||||
if len(token) > 10:
|
||||
raise ValueError(f"Token too long in file header: {token}")
|
||||
return token
|
||||
|
||||
def _open(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user