diff options
author | Peter Wu <peter@lekensteyn.nl> | 2017-08-25 11:19:06 -0700 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2017-08-27 13:45:09 +0000 |
commit | f3ba318e099f62aea51718b73e8e817482beab51 (patch) | |
tree | c50cc0cfb13ddd9bcbd5c3cd57e5e6c5f97572bf /epan/wslua/wslua_listener.c | |
parent | 22252978a4ec46ce8a0186dc31761293932a8abc (diff) |
Lua: fix crash on invalid Dissector.list("food") invocation
The Dissector.list, Listener.list and Field.list functions do not accept
a parameter. Passing one however results in a crash because the first
element is not the expected table, but the first function parameter.
Change-Id: I8483d0aa20716045472f30f5b41a449bed549b05
Reviewed-on: https://code.wireshark.org/review/23209
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/wslua/wslua_listener.c')
-rw-r--r-- | epan/wslua/wslua_listener.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/wslua/wslua_listener.c b/epan/wslua/wslua_listener.c index 606d8dddfa..0acb279479 100644 --- a/epan/wslua/wslua_listener.c +++ b/epan/wslua/wslua_listener.c @@ -279,7 +279,7 @@ WSLUA_CONSTRUCTOR Listener_list (lua_State *L) { lua_newtable(L); for (i=1; elist; i++, elist = g_list_next(elist)) { lua_pushstring(L,(const char *) elist->data); - lua_rawseti(L,1,i); + lua_rawseti(L,-2,i); } g_list_free(list); |