Commit 2674ddc8 authored by Paul Eggert's avatar Paul Eggert

* xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font): Avoid need for strlen.

parent aaafe47a
......@@ -3,6 +3,7 @@
* 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.
......
......@@ -711,9 +711,7 @@ DEFUN ("font-get-system-normal-font", Ffont_get_system_normal_font,
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,
......@@ -721,9 +719,7 @@ 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,
......
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