diff options
author | Hiroshi Ioka <hirochachacha@gmail.com> | 2016-07-26 19:38:44 +0900 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-07-26 11:31:35 +0000 |
commit | 7b75871bd9faacb948475eae4afbc7e4bd4a4c9a (patch) | |
tree | 126ea7e1c97b57a96c10c4a4d491df0fcd963649 | |
parent | d860d5a74b91b6d8e67c7735b181d70c25cf4df0 (diff) |
packet-smb2: fix data type of share_type
According to spec,
https://msdn.microsoft.com/en-us/library/cc246499.aspx
share_type uses 1 byte.
But, current implementation allocates 2 bytes for it.
Change-Id: Ibf55c49168a417c16bde57aad368a1265040afae
Reviewed-on: https://code.wireshark.org/review/16695
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-smb2.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-smb2.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c index 909cf51fe6..3b9dbf82c7 100644 --- a/epan/dissectors/packet-smb2.c +++ b/epan/dissectors/packet-smb2.c @@ -3107,7 +3107,7 @@ dissect_smb2_tree_connect_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree static int dissect_smb2_tree_connect_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, smb2_info_t *si _U_) { - guint16 share_type; + guint8 share_type; gboolean continue_dissection; switch (si->status) { @@ -3118,7 +3118,7 @@ dissect_smb2_tree_connect_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree } /* share type */ - share_type = tvb_get_letohs(tvb, offset); + share_type = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_smb2_share_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; diff --git a/epan/dissectors/packet-smb2.h b/epan/dissectors/packet-smb2.h index 6c2167dbe4..850b9414b4 100644 --- a/epan/dissectors/packet-smb2.h +++ b/epan/dissectors/packet-smb2.h @@ -81,7 +81,7 @@ typedef struct _smb2_saved_info_t { typedef struct _smb2_tid_info_t { guint32 tid; guint32 connect_frame; - guint16 share_type; + guint8 share_type; char *name; } smb2_tid_info_t; |