mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 04:21:24 +00:00
Fix unsafe use of SDATA in 'display_tty_menu_separator'
* src/xdisp.c (display_tty_menu_separator): Pass Lisp string to display_string, not a pointer to its SDATA. This is safer GC-wise.
This commit is contained in:
parent
c1fbe7c408
commit
ccb454f28c
1 changed files with 1 additions and 1 deletions
|
|
@ -27765,7 +27765,7 @@ display_tty_menu_separator (struct it *it, const char *label, int width)
|
|||
else
|
||||
c = display_tty_menu_separator_char ('-', BOX_HORIZONTAL);
|
||||
Lisp_Object sep = Fmake_string (make_fixnum (width - 1), make_fixnum (c), Qt);
|
||||
display_string ((char *) SDATA (sep), Qnil, Qnil, 0, 0, it, width, -1, -1, 1);
|
||||
display_string ((char *) SDATA (sep), sep, Qnil, 0, 0, it, width, -1, -1, 1);
|
||||
}
|
||||
|
||||
/* Display one menu item on a TTY, by overwriting the glyphs in the
|
||||
|
|
|
|||
Loading…
Reference in a new issue