Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim glyph size in ImageFont.getmask() #7669

Merged
merged 5 commits into from
Jan 1, 2024

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
59 checks passed
@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