Wireshark-commits: [Wireshark-commits] master-2.0 ba35b9c: Lua: Check out-of-bounds before tvb_strs

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 9 Feb 2016 05:30:18 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ba35b9c1ed70d737a7288bb49d79342de6492441
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master-2.0
Repository: wireshark

Commits:

ba35b9c 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>
    (cherry picked from commit 093514eb49a7b2780f49cccae905c7d963301180)
    Reviewed-on: https://code.wireshark.org/review/13845
    

Actions performed:

    from  38a01c8   llrp: limit recursion depth
    adds  ba35b9c   Lua: Check out-of-bounds before tvb_strsize()


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