0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

updated for version 7.3.824

Problem:    Can redefine builtin functions.  (ZyX)
Solution:   Disallow adding a function to g:.
This commit is contained in:
Bram Moolenaar
2013-02-20 15:19:43 +01:00
parent 452ff5bdc7
commit 2142e5d851
2 changed files with 5 additions and 0 deletions

View File

@@ -21164,6 +21164,9 @@ ex_function(eap)
if (arg[j] != NUL)
emsg_funcname((char *)e_invarg2, arg);
}
/* Disallow using the g: dict. */
if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE)
EMSG(_("E862: Cannot use g: here"));
}
/*

View File

@@ -725,6 +725,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
824,
/**/
823,
/**/