Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Jan 1, 2024

To protect against potential DOS attacks when using PIL fonts, ImageFont now trims the size of individual glyphs so that
they do not extend beyond the bitmap image.

@radarhere radarhere merged commit 10c2df5 into python-pillow:main Jan 1, 2024
@radarhere radarhere deleted the imagefont_mask branch January 1, 2024 07:17
@radarhere radarhere changed the title Do not try and crop glyphs from outside of source ImageFont image Trim glyph size in ImageFont.getmask() Jan 1, 2024
@nulano
Copy link
Contributor

nulano commented Jan 1, 2024

I've made a suggestion to this in #7672.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants