diff --git a/plugins/luamacro/_globalinfo.lua b/plugins/luamacro/_globalinfo.lua index d69c0afead..0cbb09b3d3 100644 --- a/plugins/luamacro/_globalinfo.lua +++ b/plugins/luamacro/_globalinfo.lua @@ -1,6 +1,6 @@ function export.GetGlobalInfo() return { - Version = { 1, 0, 0, 493 }, + Version = { 1, 0, 0, 494 }, MinFarVersion = { 3, 0, 0, 4276 }, Guid = win.Uuid("4EBBEFC8-2084-4B7F-94C0-692CE136894D"), Title = "LuaMacro", diff --git a/plugins/luamacro/changelog b/plugins/luamacro/changelog index 80a97618b3..cdab6d2eb9 100644 --- a/plugins/luamacro/changelog +++ b/plugins/luamacro/changelog @@ -1,4 +1,9 @@ -shmuel 17.03.2015 17:57:24 +0200 - build 493 +shmuel 18.03.2015 20:34:15 +0200 - build 494 + +1. LuaFAR (библиотека regex): падение при большом количестве captures (несколько десятков) из-за + отсутствовавшего вызова lua_checkstack. + +shmuel 17.03.2015 17:57:24 +0200 - build 493 1. С форума: Запуск lua: mf.postmacro(eval,"F1") приводит к ошибке "bad argument #1 to 'getfenv' (invalid level)". diff --git a/plugins/luamacro/luafar/lregex.c b/plugins/luamacro/luafar/lregex.c index f1da83c592..8e5012fa5f 100644 --- a/plugins/luamacro/luafar/lregex.c +++ b/plugins/luamacro/luafar/lregex.c @@ -194,6 +194,9 @@ int rx_find_match(lua_State *L, int op_find, int is_function, int is_wide) skip = (op_find || data.Count>1) ? 1 : 0; + if (!lua_checkstack(L, (int)data.Count - skip)) + luaL_error(L, "cannot add %d stack slots", (int)data.Count - skip); + for(i=skip; i= 0 && data.Match[i].end >= data.Match[i].start) diff --git a/plugins/luamacro/luamacro.rc b/plugins/luamacro/luamacro.rc index c6e896424e..3050b1501e 100644 --- a/plugins/luamacro/luamacro.rc +++ b/plugins/luamacro/luamacro.rc @@ -1,6 +1,6 @@ #include -#define PLUGIN_BUILD 493 +#define PLUGIN_BUILD 494 #define PLUGIN_DESC "Lua Macros for Far Manager" #define PLUGIN_NAME "LuaMacro" #define PLUGIN_FILENAME "luamacro.dll"