Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Only call text_layout once in getmask2 #7206 introduced new code to
font_render
, triggering https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=59831, because I didn't check thatImage.core.fill
didn't return NULL. I've added a fix for that, and tested it at https://github.com/radarhere/oss-fuzz/actions/runs/5296042009 and https://github.com/radarhere/oss-fuzz/actions/runs/5296052733.I've also improved the memory handling by destroying the image when an error occurs.
Investigating https://github.com/python-pillow/Pillow/actions/runs/5262013783, I find that this failure is because of a problem checking for decompression bombs. 529621 * 541261 should be greater than
Image.MAX_IMAGE_PIXELS * 2
, but instead it becomes a negative number. Casting tolong long
first fixes that.