Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
section.font = (GpFont *)base_font;}else{IMLangFontLink_MapFont(iMLFL, hdc, string_codepages, hfont, &map_hfont);old_font = SelectObject(hdc, map_hfont);GdipCreateFontFromDC(hdc, &gpfont);SelectObject(hdc, old_font);IMLangFontLink_ReleaseFont(iMLFL, map_hfont);section.font = gpfont;}section.len = processed;sections_count = ++font_link_info->count;font_link_info->sections = realloc(font_link_info->sections, sizeof(section) * sections_count);font_link_info->sections[sections_count - 1] = section;
Probably would make sense to allocate exponentially instead of linearly, in case there are a lot of these.