[php-src] PR #13139: Follow-up fix for GH-13082
| From: | nielsdos | Date: | Sat, 13 Jan 2024 16:21:50 +0000 |
| Subject: | [php-src] PR #13139: Follow-up fix for GH-13082 | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-24756@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13139
Author: nielsdos
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.