The offending font is NotoColorEmoji.ttf which is present in, e. g., google-noto-emoji-color-fonts or noto-fonts-emoji packages available in various distribution. Attempting to load this font on Windows 10 (with AddFontResourceA() or open it with default font viewer) fails while currently succeeds on Windows. fontforge also refuses to open this font. That is because the font is bitmap only but missing bitmap table.
Some apps (Glyph launcher is an example) try to GetOutlineTextMetrics() on this font and do not expect that to have an error return (as we currenly do), which leads to crash on unhandled division by zero exception.
I am attaching a bitmap-only ttf test font (with only one bitmap) which I created with fontforge to make sure that such font can still be loaded in Wine. This font also loads on Windows (both with AddFontResourceA() and with default font viewer).
There are other font types which can be legitimately missing EBDT table, but FT_Load_Sfnt_Table() returns a different error for those and my patch doesn't reject those fonts.
[test.ttf](/uploads/b41472180b80c2c53f9dcc06055990f0/test.ttf)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/411
On Sat Dec 2 18:00:47 2023 +0000, Petrichor Park wrote:
> (the change is to remove the `vkd3d_test_push_context` call on L1439,
> and then I'd need to remove the matching `vkd3d_test_pop_context` call
> that's somewhere)
Currently we push the debug context when entering a section and pop it just before entering the following one. It would be enough to keep doing this for all except for the `[test]` section, and push and pull at each line inside a `[test]` section. Does this make sense for you?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/499#note_54833
*pszTmpFileName will be freed with free() but it's allocated with HeapAlloc().
--
v2: ntdll: Fix a memory leak (Coverity).
shell32: Fix a memory leak (Coverity).
wininet: Fix a use-after-free (Coverity).
tasklist: Fix a possible buffer overrun (Coverity).
https://gitlab.winehq.org/wine/wine/-/merge_requests/4590