]> granicus.if.org Git - vim/commitdiff
patch 7.4.954 v7.4.954
authorBram Moolenaar <Bram@vim.org>
Thu, 3 Dec 2015 16:43:17 +0000 (17:43 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 3 Dec 2015 16:43:17 +0000 (17:43 +0100)
Problem:    When using Lua there may be a crash. (issue #468)
Solution:   Avoid using an unitialized tv. (Yukihiro Nakadaira)

src/if_lua.c
src/version.c

index bc2d6c3678d219e8d8fa130d204b70d260452765..e94c96dff136c21c59e021ee997a147bfff9fae2 100644 (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;
index 3cdc86fa74f518259c6235e6cb68e6f7b3e67919..b459c87b1e2c8c07003c55f63aa72eefac6e747b 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    954,
 /**/
     953,
 /**/