Wireshark-commits: [Wireshark-commits] master eddfa0f: dissectors: hartip: Fix command 77 decoding

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 12 Jun 2020 06:03:43 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=eddfa0f1467b8707630bd0191549b34d06d60509
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

eddfa0f by Alexander Dahl (ada@xxxxxxxxxxx):

    dissectors: hartip: Fix command 77 decoding
    
    Two things were broken with command 77 decoding:
    
    1. There's an additional byte in the request, which is not present in
       the response, so the offsets where misplaced for all requests by one.
    
    2. The embedded command (like all the other HART pass-through commands)
       distinguishes between long and short addresses, depending on the
       delimiter byte in front. When using that long address (which is the
       usual thing for all embedded commands except command 0) the remaining
       fields where also displaced.
    
    Both points lead to obviously broken decoding due to misplaced offsets.
    
    Fixes: 0ee1445ada61 ("Improve HART dissector")
    Signed-off-by: Alexander Dahl <ada@xxxxxxxxxxx>
    Change-Id: I4355fe73b5164a4f03e522127ed487749279da65
    Reviewed-on: https://code.wireshark.org/review/37411
    Petri-Dish: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  24712ec   Kafka: fix the FETCH response alignment issue
     add  eddfa0f   dissectors: hartip: Fix command 77 decoding


Summary of changes:
 epan/dissectors/packet-hartip.c | 52 +++++++++++++++++++++++++++++++++++------
 1 file changed, 45 insertions(+), 7 deletions(-)