Commit f0db687a authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu

Avoid crash inside CFCharacterSetIsLongCharacterMember (Bug#36507)

* src/macfont.m (macfont_supports_charset_and_languages_p)
(macfont_has_char): Don't pass integers outside the Unicode codespace to
CFCharacterSetIsLongCharacterMember.  Do not merge to master.
parent e97c0437
Pipeline #2251 passed with stage
in 35 minutes and 4 seconds
......@@ -2070,7 +2070,7 @@ static int macfont_variation_glyphs (struct font *, int c,
ptrdiff_t j;
for (j = 0; j < ASIZE (chars); j++)
if (TYPE_RANGED_INTEGERP (UTF32Char, AREF (chars, j))
&& CFCharacterSetIsLongCharacterMember (desc_charset,
XFASTINT (AREF (chars, j))))
......@@ -2705,6 +2705,9 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
int result;
CFCharacterSetRef charset;
if (c < 0 || c > MAX_UNICODE_CHAR)
return false;
block_input ();
if (FONT_ENTITY_P (font))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment