Skip to content

Commit f609dcf

Browse files
committed
patch 7.4.954
Problem: When using Lua there may be a crash. (issue #468) Solution: Avoid using an unitialized tv. (Yukihiro Nakadaira)
1 parent de0ad40 commit f609dcf

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/if_lua.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1561,14 +1561,15 @@ luaV_setref (lua_State *L)
15611561
{
15621562
tv.v_type = VAR_LIST;
15631563
tv.vval.v_list = (list_T *) lua_touserdata(L, 4); /* key */
1564+
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
15641565
}
15651566
else if (lua_rawequal(L, -1, 3)) /* dict? */
15661567
{
15671568
tv.v_type = VAR_DICT;
15681569
tv.vval.v_dict = (dict_T *) lua_touserdata(L, 4); /* key */
1570+
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
15691571
}
15701572
lua_pop(L, 2); /* metatable and value */
1571-
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
15721573
}
15731574
lua_pushinteger(L, abort);
15741575
return 1;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
954,
744746
/**/
745747
953,
746748
/**/

0 commit comments

Comments
 (0)