Skip to content

Commit 9135fd0

Browse files
committed
Mention limit in error message
1 parent 08d9c89 commit 9135fd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PIL/PngImagePlugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _safe_zlib_decompress(s: bytes) -> bytes:
140140
dobj = zlib.decompressobj()
141141
plaintext = dobj.decompress(s, MAX_TEXT_CHUNK)
142142
if dobj.unconsumed_tail:
143-
msg = "Decompressed Data Too Large"
143+
msg = "Decompressed data too large for PngImagePlugin.MAX_TEXT_CHUNK"
144144
raise ValueError(msg)
145145
return plaintext
146146

0 commit comments

Comments
 (0)