Wireshark-commits: [Wireshark-commits] master 4a8da5f: wslua: Fix crash on TvbRange:__tostring for
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 16 Mar 2020 22:42:11 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=4a8da5fbde2b731aeba451735497b46361873282
Submitter: "Peter Wu <peter@xxxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

4a8da5f 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>
    

Actions performed:

    from  2b50d12   tools: do not install doxygen
     add  4a8da5f   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(-)