Wireshark-commits: [Wireshark-commits] master-3.0 63b2658: wslua: Fix crash on TvbRange:__tostring

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 16 Mar 2020 22:43:24 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=63b2658ba6fbe14f7c6b3369af4e7f33d2bf410c
Submitter: "Peter Wu <peter@xxxxxxxxxxxxx>"
Changed: branch: master-3.0
Repository: wireshark

Commits:

63b2658 by Moshe Kaplan (me@xxxxxxxxxxxxxxx):

    wslua: Fix crash on TvbRange:__tostring for a zero-length TVB
    
    Fields such as 'frame.time_delta' have no byte selection, they are added
    with offset 0 and length 0, and evidently 'ws_tvb' is NULL. As
    tvb_bytes_to_str expects a non-NULL tvb, explicitly check for this and
    add a dummy placeholder. This is intended to be a human-readable string,
    so prefer `<EMPTY>` over an empty string.
    
    Change-Id: I32efe4cbefc6bcf0fa9fb94fcf25d7bf1628f3a7
    Reviewed-on: https://code.wireshark.org/review/36440
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    (cherry picked from commit 4a8da5fbde2b731aeba451735497b46361873282)
    Reviewed-on: https://code.wireshark.org/review/36477
    

Actions performed:

    from  b13a829   tools: do not install doxygen
     add  63b2658   wslua: Fix crash on TvbRange:__tostring for a zero-length TVB


Summary of changes:
 epan/wslua/wslua_tvb.c | 11 +++++++----
 test/lua/field.lua     |  2 ++
 2 files changed, 9 insertions(+), 4 deletions(-)