1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00

* src/xterm.c (x_term_init): Use memcpy instead of strncpy.

Fixes: debbugs:11373
This commit is contained in:
Jim Meyering 2012-05-02 18:17:03 +08:00 committed by Chong Yidong
parent 9aa071dfb9
commit 3f83ace849
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2012-05-02 Jim Meyering <jim@meyering.net>
* xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
2012-05-02 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (pos_visible_p): If already at a newline from the

View file

@ -10146,7 +10146,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
/* Set the name of the terminal. */
terminal->name = (char *) xmalloc (SBYTES (display_name) + 1);
strncpy (terminal->name, SSDATA (display_name), SBYTES (display_name));
memcpy (terminal->name, SSDATA (display_name), SBYTES (display_name));
terminal->name[SBYTES (display_name)] = 0;
#if 0