Wireshark-commits: [Wireshark-commits] master 9f55eb4: wslua: fix wslua file test failure
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9f55eb4e954dd125e229bc94892e1571abd2cd65
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
9f55eb4 by Peter Wu (peter@xxxxxxxxxxxxx):
wslua: fix wslua file test failure
Lua 5.2.4 built with -DLUA_USE_APICHECK detected a stack issue:
tshark: lapi.c:175: lua_settop: Assertion `(-(idx+1) <= (L->top - (func + 1))) && "invalid new top"' failed.
Function File_read always assumes that File_read_line pushes a value on
the stack (which clearly did not happen). On read failure, it would then
pop the stack (tripping the assertion) to push nil.
The other user (File_lines) is also affected by this change, but the Lua
5.2.4 documentation says that it should also return nil on EOF, fitting
this implementation.
Change-Id: I9cc8a5319523b2b56f4ae4735bbdbc1196387386
Reviewed-on: https://code.wireshark.org/review/18016
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Actions performed:
from 3ab0137 [Automatic update for 2016-10-02]
adds 9f55eb4 wslua: fix wslua file test failure
Summary of changes:
epan/wslua/wslua_file.c | 10 ++++++++++
1 file changed, 10 insertions(+)