Pass a pointer to a stack-allocated boundingRect to CTFontGetBoundingRectsForGlyphs() in Font::platformBoundsForGlyph(). Also take a look at Font::isProbablyOnlyUsedToRenderIcons(), as it has the same issue. <rdar://problem/70738704>
Created attachment 413843 [details] Patch
Committed r269823: <https://trac.webkit.org/changeset/269823> All reviewed patches have been landed. Closing bug and clearing flags on attachment 413843 [details].
Comment on attachment 413843 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413843&action=review > Source/WebCore/ChangeLog:9 > + Provide a zero CGRect boundingRect pointer in two places where the count argument > + to CTFontGetBoundingRectsForGlyphs() is already 1. The code below provides an *uninitialized* CGRect, not a zero CGRect. Do we need a zero CGRect?
Good catch, it is just a plain struct. I will add code to zero this.