mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 08:56:29 +00:00
vim-patch:7.4.815
Problem: Invalid memory access when doing ":call g:".
Solution: Check for an empty name. (Dominique Pelle)
73627d0bd4
This commit is contained in:
@@ -18578,6 +18578,9 @@ static hashtab_T *find_var_ht_dict(char_u *name, uint8_t **varname, dict_T **d)
|
|||||||
hashitem_T *hi;
|
hashitem_T *hi;
|
||||||
*d = NULL;
|
*d = NULL;
|
||||||
|
|
||||||
|
if (name[0] == NUL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if (name[1] != ':') {
|
if (name[1] != ':') {
|
||||||
// name has implicit scope
|
// name has implicit scope
|
||||||
if (name[0] == ':' || name[0] == AUTOLOAD_CHAR) {
|
if (name[0] == ':' || name[0] == AUTOLOAD_CHAR) {
|
||||||
@@ -18627,6 +18630,7 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find the hashtab used for a variable name.
|
// Find the hashtab used for a variable name.
|
||||||
|
// Return NULL if the name is not valid.
|
||||||
// Set "varname" to the start of name without ':'.
|
// Set "varname" to the start of name without ':'.
|
||||||
static hashtab_T *find_var_ht(uint8_t *name, uint8_t **varname)
|
static hashtab_T *find_var_ht(uint8_t *name, uint8_t **varname)
|
||||||
{
|
{
|
||||||
|
@@ -473,7 +473,7 @@ static int included_patches[] = {
|
|||||||
// 818,
|
// 818,
|
||||||
// 817,
|
// 817,
|
||||||
// 816,
|
// 816,
|
||||||
// 815,
|
815,
|
||||||
814,
|
814,
|
||||||
813,
|
813,
|
||||||
// 812,
|
// 812,
|
||||||
|
Reference in New Issue
Block a user