Wireshark-commits: [Wireshark-commits] master 2f6a692: TPNCP: Fix dissection of acTOpenOrUpdateSBCS

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 26 Mar 2020 11:13:21 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=2f6a692fcdc17a6eb332cbc3e2d546ac5c14d951
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

2f6a692 by Orgad Shaneh (orgad.shaneh@xxxxxxxxxxxxxx):

    TPNCP: Fix dissection of acTOpenOrUpdateSBCSession
    
    Struct Layout:
    struct acTOpenOrUpdateSBCSession
    {
      int CidA;
      int CidB;
      int ChannelACommandSeqNumber;
      int ChannelBCommandSeqNumber;
      acMediationLevel  AudioMediationLevel;
      int SourceDirection;
      int DestinationDirection;
      acAudioTranscodingMode AudioTranscodingMode;
      acSBCConnectionType SBCConnectionType;
      acTSBCChannelConfiguration ChannelAConfiguration;
      acTSBCChannelConfiguration ChannelBConfiguration;
    };
    
    acTSBCChannelConfiguration size can vary, so Channel B might be
    incorrectly dissected.
    
    Fix by recognizing the first field of acTSBCChannelConfiguration and
    dividing the remaining size by 2, giving each channel the same byte
    count.
    
    Change-Id: I961394523fc307fa214d36c3eae5589f788fc6df
    Reviewed-on: https://code.wireshark.org/review/36584
    Petri-Dish: Anders Broman <a.broman58@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  7785557   Add a dissector for the USB printer class.
     add  2f6a692   TPNCP: Fix dissection of acTOpenOrUpdateSBCSession


Summary of changes:
 epan/dissectors/packet-tpncp.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)