forked from osmocom/wireshark
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>
This commit is contained in:
parent
d860d5a74b
commit
7b75871bd9
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue