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

Crash on trying to load corrupted font as file handle #3853

Closed
nijel opened this issue May 15, 2019 · 0 comments · Fixed by #3912
Closed

Crash on trying to load corrupted font as file handle #3853

nijel opened this issue May 15, 2019 · 0 comments · Fixed by #3912
Labels

Comments

@nijel
Copy link
Contributor

nijel commented May 15, 2019

What did you do?

When loading corrupted file by handle, PIL crashes:

# python -c "from PIL import ImageFont; print(ImageFont.truetype(open('setup.py', 'rb')))"
double free or corruption (top)
Aborted

(Originally observed on actually corrupt TTF file, but it as well triggered by non font)

What did you expect to happen?

Raise an exception

What actually happened?

Crash (SIGABRT)

What are your OS, Python and Pillow versions?

  • OS: Linux
  • Python: 3.7.3
  • Pillow: 6.0.0, reproduced with current git master
nijel added a commit to nijel/weblate that referenced this issue Aug 23, 2024
python-pillow/Pillow#3853 has been fixed years
ago, so remove workaround for it (we depend on recent Pillow anyway for
security fixes).
nijel added a commit to WeblateOrg/weblate that referenced this issue Aug 23, 2024
python-pillow/Pillow#3853 has been fixed years
ago, so remove workaround for it (we depend on recent Pillow anyway for
security fixes).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants