Skip to content

Follow-up fix for GH-13082 #13139

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

Closed
wants to merge 1 commit into from
Closed

Conversation

nielsdos
Copy link
Member

The font_obj variable should actually be NULL initialised, not the font gd pointer.

I missed this in the original code review, but upon adapting a static analyser to find these kinds of issues I found this again.
The reason I missed this is because the variable names are a bit confusing, and they're using C89 style instead of C99 which is confusing because you can't easily see what's used where.
So I merged the declaration and assignment of font such that it's clear that font is always initialised while font_obj has to be NULL-initialised.

The font_obj should actually be NULL initialised, not the font gd
pointer.
Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nielsdos nielsdos closed this in df85c25 Jan 13, 2024
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