Wireshark-commits: [Wireshark-commits] master-3.0 362c17d: radiotap: make tables that we modify aut
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 18 Jun 2020 08:22:03 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=362c17d7f181e9c2156c8e106a9f7b45235cd3a4
Submitter: "Guy Harris <gharris@xxxxxxxxx>"
Changed: branch: master-3.0
Repository: wireshark

Commits:

362c17d by Guy Harris (gharris@xxxxxxxxx):

    radiotap: make tables that we modify automatic rather than static.
    
    The arrays of pointers to header field hf_ values were getting
    overwritten if the fields in question are unknown; that meant that, in
    all future dissections, they would be dissected as unknown *even for
    packets where they are known*.
    
    Make them auto arrays, instead, so that each call to the dissector has
    its own copy, properly initialized at run time, that it can scribble
    over as it chooses without damaging the array for the next call.
    
    This involves a cast to work around the type of the array argument being
    "const int **", which means "pointer to pointer to const int",
    not "pointer to const pointer to (non-const) int".  That meant that the
    scribbling on the static array was *not* detected at compile time.
    
    Fixing the type is a *lot* of work, but may catch other instances of
    this problem, and may prevent future instances of it.  That's a project
    for a separate commit, however.
    
    Bug: 16636
    Change-Id: I985157063488739bb59f87780c017e94e2380343
    Reviewed-on: https://code.wireshark.org/review/37502
    Petri-Dish: Guy Harris <gharris@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <gharris@xxxxxxxxx>
    (cherry picked from commit 7a526325e9568a0722798dc1f386576464744e77)
    Reviewed-on: https://code.wireshark.org/review/37505
    

Actions performed:

    from  fee2774   802.11 radiotap: Fix wrong data structure in the dissector for HE TRIGGER frames
     add  362c17d   radiotap: make tables that we modify automatic rather than static.


Summary of changes:
 epan/dissectors/packet-ieee80211-radiotap.c | 144 ++++++++++++++++------------
 1 file changed, 84 insertions(+), 60 deletions(-)