Wireshark-commits: [Wireshark-commits] master-2.0 531fe41: wslua: don't crash if disable_lua = true

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 28 Feb 2016 18:27:50 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=531fe416eb038bc064a01fe35fe255b81a20dc05
Submitter: Stig Bj?rlykke (stig@xxxxxxxxxxxxx)
Changed: branch: master-2.0
Repository: wireshark

Commits:

531fe41 by Martin Kaiser (wireshark@xxxxxxxxx):

    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@xxxxxxxxxxxxx>
    (cherry picked from commit ddcafa06dfb1efe367c2495fc6a8b2cbcda203a1)
    Reviewed-on: https://code.wireshark.org/review/14229
    

Actions performed:

    from  0f79d91   [Automatic update for 2016-02-28]
    adds  531fe41   wslua: don't crash if disable_lua = true in init.lua


Summary of changes:
 epan/wslua/init_wslua.c |    1 +
 1 file changed, 1 insertion(+)