On Mon, 30 Mar 2026 18:48:54 GMT, Kevin Rushforth <[email protected]> wrote:

> This PR fixes a bug where an uninitialized `type` variable is stored in the 
> struct passed into the method and later could be used in computation.
> 
> This bug should never actually happen, since the switch statement already 
> covers all valid types. However, it should be fixed as a best-practice.
> 
> NOTE: This fix is in Mac-specific platform code. All code in coretext.c is 
> under an ifdef for Apple.

The enclosing function `pathApplierFunctionFast` is supplied as a callback to 
`CGPathApply`.  
>From the source, looks like `CGPathApply` uses the `CGPathRef` generated from 
>`CTFontCreatePathForGlyph`, and calls `pathApplierFunctionFast` for each 
>`CGPathElement` in `CGPathRef`
So, the `CGPathElement` received by `pathApplierFunctionFast` is created by the 
CG APIs. And all the types are handled in the switch case.
LGTM

-------------

Marked as reviewed by arapte (Reviewer).

PR Review: https://git.openjdk.org/jfx/pull/2133#pullrequestreview-4033946250

Reply via email to