aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib
diff options
context:
space:
mode:
authorFrederic Marec <frederic.marec@iot.bzh>2019-10-11 16:34:42 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2019-11-06 10:04:20 +0000
commitb39c6883f7d7d58d60178441c8d408118788418b (patch)
tree3c262f15453b84af24d44591a59a55162aaaaa18 /ctl-lib
parent82ae636ea0544c9ba56c727c41097494873d7438 (diff)
Change LuaAfbEventPush to Handle tableicefish_8.99.1icefish/8.99.18.99.1
Prevent table overflow Bug-AGL: SPEC-2374 Change-Id: Ibce96446735cd0caeeefa91fff57245943023047 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
Diffstat (limited to 'ctl-lib')
-rw-r--r--ctl-lib/ctl-lua.c3
1 files changed, 1 insertions, 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);