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

Fix double free in font loading failure #3854

Closed
wants to merge 3 commits into from
Closed

Fix double free in font loading failure #3854

wants to merge 3 commits into from

Conversation

nijel
Copy link
Contributor

@nijel nijel commented May 15, 2019

The memory is freeed in font_dealloc, doing that again leads to SIGABRT.

Fixes #3853.

Changes proposed in this pull request:

  • it removes double free in error handling path

I wanted to add test for this, but the error handling futher is broken as well (the invalid font raises IOError, which is later intepreted as missing file and loader tries to do os.path.basename on a file like object), so I ended up fixing the crash only for now.

nijel and others added 3 commits June 24, 2019 07:09
The memory is freeed in font_dealloc, doing that again leads to SIGABRT.
@hugovk
Copy link
Member

hugovk commented Jun 27, 2019

Thank you for the report and the PR! The alternative PR #3912 has been merged so let's close this. The fix will be in next week's release.

@hugovk hugovk closed this Jun 27, 2019
@nijel nijel deleted the patch-1 branch June 28, 2019 06:41
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 this pull request may close these issues.

Crash on trying to load corrupted font as file handle
3 participants