0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.954

Problem:    When using Lua there may be a crash. (issue #468)
Solution:   Avoid using an unitialized tv. (Yukihiro Nakadaira)
This commit is contained in:
Bram Moolenaar 2015-12-03 17:43:17 +01:00
parent de0ad40cb3
commit f609dcf8c1
2 changed files with 4 additions and 1 deletions

View File

@ -1561,14 +1561,15 @@ luaV_setref (lua_State *L)
{
tv.v_type = VAR_LIST;
tv.vval.v_list = (list_T *) lua_touserdata(L, 4); /* key */
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
}
else if (lua_rawequal(L, -1, 3)) /* dict? */
{
tv.v_type = VAR_DICT;
tv.vval.v_dict = (dict_T *) lua_touserdata(L, 4); /* key */
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
}
lua_pop(L, 2); /* metatable and value */
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
}
lua_pushinteger(L, abort);
return 1;

View File

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