From 4ea033c56ad1e07c82cad570758b7715eefb4f23 Mon Sep 17 00:00:00 2001 From: Frederic Marec Date: Fri, 11 Oct 2019 16:34:42 +0200 Subject: Change LuaAfbEventPush to Handle table Prevent table overflow Bug-AGL: SPEC-2374 Change-Id: Ibce96446735cd0caeeefa91fff57245943023047 Signed-off-by: Frederic Marec (cherry picked from commit b39c6883f7d7d58d60178441c8d408118788418b) --- ctl-lib/ctl-lua.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ctl-lib/ctl-lua.c b/ctl-lib/ctl-lua.c index 04b4ce9..5509385 100644 --- a/ctl-lib/ctl-lua.c +++ b/ctl-lib/ctl-lua.c @@ -492,7 +492,6 @@ static int LuaAfbServiceSync(lua_State* luaState) { return 1; } - // get source/api/verb+query const char *api = lua_tostring(luaState, LUA_FIRST_ARG + 1); const char *verb = lua_tostring(luaState, LUA_FIRST_ARG + 2); @@ -536,7 +535,7 @@ static int LuaAfbEventPush(lua_State* luaState) { return 1; } - json_object *ctlEventJ = LuaTableToJson(source, luaState, LUA_FIRST_ARG + 2); + json_object *ctlEventJ = LuaPopOneArg(source, luaState, LUA_FIRST_ARG + 2); if (!ctlEventJ) { lua_pushliteral(luaState, "LuaAfbEventPush: Syntax is AFB:signal ([evtHandle], {lua table})"); lua_error(luaState); -- cgit 1.2.3-korg