* xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
+ * xfns.c (x_window): Use xstrdup (Bug#11375).
+
2012-05-02 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (pos_visible_p): If already at a newline from the
/* Do some needed geometry management. */
{
- ptrdiff_t len;
char *tem, shell_position[sizeof "=x++" + 4 * INT_STRLEN_BOUND (int)];
Arg gal[10];
int gac = 0;
}
}
- len = strlen (shell_position) + 1;
/* We don't free this because we don't know whether
it is safe to free it while the frame exists.
It isn't worth the trouble of arranging to free it
when the frame is deleted. */
- tem = (char *) xmalloc (len);
- strncpy (tem, shell_position, len);
+ tem = (char *) xstrdup (shell_position);
XtSetArg (gal[gac], XtNgeometry, tem); gac++;
XtSetValues (shell_widget, gal, gac);
}