* xsettings.c (apply_xft_settings): Fix potential buffer overrun.
This is unlikely, but can occur if DPI is outlandish.
+ * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
* xselect.c (Fx_get_atom_name): Avoid need for strlen.
* xrdb.c: Don't assume strlen fits in int; avoid some strlens.
doc: /* Get the system default application font. */)
(void)
{
- return current_font
- ? make_string (current_font, strlen (current_font))
- : Qnil;
+ return current_font ? build_string (current_font) : Qnil;
}
DEFUN ("font-get-system-font", Ffont_get_system_font, Sfont_get_system_font,
doc: /* Get the system default fixed width font. */)
(void)
{
- return current_mono_font
- ? make_string (current_mono_font, strlen (current_mono_font))
- : Qnil;
+ return current_mono_font ? build_string (current_mono_font) : Qnil;
}
DEFUN ("tool-bar-get-system-style", Ftool_bar_get_system_style,