Wireshark-commits: [Wireshark-commits] master-1.12 f1192a5: Lua: Check out-of-bounds before tvb_str

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 9 Feb 2016 17:13:17 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=f1192a51aa8f81212fb35f01497d54909fff1f54
Submitter: Stig Bj?rlykke (stig@xxxxxxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark

Commits:

f1192a5 by Stig Bjørlykke (stig@xxxxxxxxxxxxx):

    Lua: Check out-of-bounds before tvb_strsize()
    
    Add a check for out-of-bounds before calling tvb_strsize() because
    this will THROW an exception if not finding a terminating NUL.
    
    Unhandled exceptions will mess up Lua luaL_error() handling and
    will end up in a crash.
    
    Change-Id: Ieafef59a3858656e0d8c79904828b631657b4cbc
    Reviewed-on: https://code.wireshark.org/review/13842
    Petri-Dish: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    Reviewed-on: https://code.wireshark.org/review/13853
    Reviewed-by: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    

Actions performed:

    from  c1afc0c   Lua: Disallow ProtoField FRAMENUM to fetch from Tvb.
    adds  f1192a5   Lua: Check out-of-bounds before tvb_strsize()


Summary of changes:
 epan/wslua/wslua_tree.c |   19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)