mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
Do not raise SyntaxError for wrong chunks (just ignore them)
This commit is contained in:
parent
38eff74004
commit
a26a584812
|
@ -113,7 +113,8 @@ class ChunkStream(object):
|
|||
length = i32(s)
|
||||
|
||||
if not is_cid(cid):
|
||||
raise SyntaxError("broken PNG file (chunk %s)" % repr(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