mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Merge pull request #8391 from radarhere/png_decompress
This commit is contained in:
commit
e80cada0f6
|
@ -140,7 +140,7 @@ def _safe_zlib_decompress(s: bytes) -> bytes:
|
||||||
dobj = zlib.decompressobj()
|
dobj = zlib.decompressobj()
|
||||||
plaintext = dobj.decompress(s, MAX_TEXT_CHUNK)
|
plaintext = dobj.decompress(s, MAX_TEXT_CHUNK)
|
||||||
if dobj.unconsumed_tail:
|
if dobj.unconsumed_tail:
|
||||||
msg = "Decompressed Data Too Large"
|
msg = "Decompressed data too large for PngImagePlugin.MAX_TEXT_CHUNK"
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
return plaintext
|
return plaintext
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user