Problem: gcc complains about buffer overrun.
Solution: Use mch_memmove() instead of STRCPY(). (John Marriott)
dictitem_alloc(char_u *key)
{
dictitem_T *di;
+ size_t len = STRLEN(key);
- di = alloc(offsetof(dictitem_T, di_key) + STRLEN(key) + 1);
+ di = alloc(offsetof(dictitem_T, di_key) + len + 1);
if (di != NULL)
{
- STRCPY(di->di_key, key);
+ mch_memmove(di->di_key, key, len + 1);
di->di_flags = DI_FLAGS_ALLOC;
di->di_tv.v_lock = 0;
di->di_tv.v_type = VAR_UNKNOWN;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3875,
/**/
3874,
/**/