python-pillow/Pillow — pull request #1060 by wiredfool (2014-12-29 22:58:26+00:00)
Title: Fix potential PNG decompression DOS

@hugovk @aclark4life

Two outstanding bits:

1) interface for the developer -- It behaves a little differently than the decompression bomb warning in that this just tosses a value error. But it's less likely to have false positives.
2) It doesn't defend against images that have many just under the limit text segments.

Opinions?

(note that I had to change the test to pass -- I believe that the new version is also a reasonable representation of an invalid iTXt segment)