2011-06-19 Paul Eggert <eggert@cs.ucla.edu>
+ * coding.c (make_subsidiaries): Don't assume string length fits in int.
+
* callproc.c (child_setup): Rewrite to avoid two strlen calls.
* process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
make_subsidiaries (Lisp_Object base)
{
Lisp_Object subsidiaries;
- int base_name_len = SBYTES (SYMBOL_NAME (base));
+ ptrdiff_t base_name_len = SBYTES (SYMBOL_NAME (base));
char *buf = (char *) alloca (base_name_len + 6);
int i;
subsidiaries = Fmake_vector (make_number (3), Qnil);
for (i = 0; i < 3; i++)
{
- memcpy (buf + base_name_len, suffixes[i], strlen (suffixes[i]) + 1);
+ strcpy (buf + base_name_len, suffixes[i]);
ASET (subsidiaries, i, intern (buf));
}
return subsidiaries;