mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-14 11:26:27 +03:00
Do not raise SyntaxError for wrong chunks (just ignore them)
This commit is contained in:
parent
38eff74004
commit
a26a584812
|
@ -113,6 +113,7 @@ class ChunkStream(object):
|
|||
length = i32(s)
|
||||
|
||||
if not is_cid(cid):
|
||||
if not ImageFile.LOAD_TRUNCATED_IMAGES:
|
||||
raise SyntaxError("broken PNG file (chunk %s)" % repr(cid))
|
||||
|
||||
return cid, pos, length
|
||||
|
|
Loading…
Reference in New Issue
Block a user