diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2016-02-28 17:53:52 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2016-02-28 18:27:08 +0000 |
commit | ddcafa06dfb1efe367c2495fc6a8b2cbcda203a1 (patch) | |
tree | 3052f241a415a653d9a4e82631727ad54c614b9f /epan | |
parent | 1a716800e37ae482901e9cce36c40005742dd78e (diff) |
wslua: don't crash if disable_lua = true in init.lua
in wslua_init(), our lua instance L is set to NULL if
disable_lua is true in init.lua
make sure that we leave wslua_init() in this case
if we don't, we crash in lua_pop(L,1); with L==NULL
Program received signal SIGSEGV, Segmentation fault.
0x00007fffefb41a73 in lua_settop () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
(gdb) bt
#0 0x00007fffefb41a73 in lua_settop () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#1 0x00007ffff4fb50e4 in wslua_init (cb=cb@entry=0x516f40 <splash_update(register_action_e, char const*, void*)>,
client_data=client_data@entry=0x0) at init_wslua.c:900
[...]
Bug:12196
Change-Id: Ic338c4edcb897c0eaa9b6755bbb6c9991ec6ed02
Reviewed-on: https://code.wireshark.org/review/14228
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/wslua/init_wslua.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/wslua/init_wslua.c b/epan/wslua/init_wslua.c index e76f3e8d8d..2141dcb947 100644 --- a/epan/wslua/init_wslua.c +++ b/epan/wslua/init_wslua.c @@ -896,6 +896,7 @@ void wslua_init(register_cb cb, gpointer client_data) { lua_close(L); L = NULL; first_time = FALSE; + return; } lua_pop(L,1); /* pop the getglobal result */ |