SMB/SMB2: FS Name is always Unicode
According to MS-CIFS sections 2.2.8.2.6 [1] FS Name (or Label) string is in unicode. [1]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/1011206a-55c5-4dbf-aff0-119514136940 Fixes: wireshark/wireshark#17064
This commit is contained in:
parent
ba16825c6c
commit
c876b34ed1
|
@ -15952,7 +15952,7 @@ dissect_qfsi_FS_DEVICE_INFO(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
dissect_qfsi_FS_ATTRIBUTE_INFO(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int offset, guint16 *bcp, int unicode)
|
dissect_qfsi_FS_ATTRIBUTE_INFO(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, int offset, guint16 *bcp)
|
||||||
{
|
{
|
||||||
int fn_len, fnl;
|
int fn_len, fnl;
|
||||||
const char *fn;
|
const char *fn;
|
||||||
|
@ -15975,7 +15975,7 @@ dissect_qfsi_FS_ATTRIBUTE_INFO(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tr
|
||||||
|
|
||||||
/* label */
|
/* label */
|
||||||
fn_len = fnl;
|
fn_len = fnl;
|
||||||
fn = get_unicode_or_ascii_string(tvb, &offset, unicode, &fn_len, FALSE, TRUE, bcp);
|
fn = get_unicode_or_ascii_string(tvb, &offset, TRUE, &fn_len, FALSE, TRUE, bcp);
|
||||||
CHECK_STRING_TRANS_SUBR(fn);
|
CHECK_STRING_TRANS_SUBR(fn);
|
||||||
proto_tree_add_string(tree, hf_smb_fs_name, tvb, offset, fn_len,
|
proto_tree_add_string(tree, hf_smb_fs_name, tvb, offset, fn_len,
|
||||||
fn);
|
fn);
|
||||||
|
@ -16118,7 +16118,7 @@ dissect_qfsi_vals(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
||||||
break;
|
break;
|
||||||
case 0x0105: /* SMB_QUERY_FS_ATTRIBUTE_INFO */
|
case 0x0105: /* SMB_QUERY_FS_ATTRIBUTE_INFO */
|
||||||
case 1005: /* SMB_FS_ATTRIBUTE_INFORMATION */
|
case 1005: /* SMB_FS_ATTRIBUTE_INFORMATION */
|
||||||
offset = dissect_qfsi_FS_ATTRIBUTE_INFO(tvb, pinfo, tree, offset, bcp, si->unicode);
|
offset = dissect_qfsi_FS_ATTRIBUTE_INFO(tvb, pinfo, tree, offset, bcp);
|
||||||
break;
|
break;
|
||||||
case 0x200: { /* SMB_QUERY_CIFS_UNIX_INFO */
|
case 0x200: { /* SMB_QUERY_CIFS_UNIX_INFO */
|
||||||
proto_item *item_2 = NULL;
|
proto_item *item_2 = NULL;
|
||||||
|
|
|
@ -346,7 +346,7 @@ extern int dissect_security_information_mask(tvbuff_t *tvb, proto_tree *parent_t
|
||||||
extern int dissect_qfsi_FS_VOLUME_INFO(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int offset, guint16 *bcp, int unicode);
|
extern int dissect_qfsi_FS_VOLUME_INFO(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int offset, guint16 *bcp, int unicode);
|
||||||
extern int dissect_qfsi_FS_SIZE_INFO(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int offset, guint16 *bcp);
|
extern int dissect_qfsi_FS_SIZE_INFO(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int offset, guint16 *bcp);
|
||||||
extern int dissect_qfsi_FS_DEVICE_INFO(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int offset, guint16 *bcp);
|
extern int dissect_qfsi_FS_DEVICE_INFO(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int offset, guint16 *bcp);
|
||||||
extern int dissect_qfsi_FS_ATTRIBUTE_INFO(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int offset, guint16 *bcp, int unicode);
|
extern int dissect_qfsi_FS_ATTRIBUTE_INFO(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int offset, guint16 *bcp);
|
||||||
extern int dissect_nt_quota(tvbuff_t *tvb, proto_tree *tree, int offset, guint16 *bcp);
|
extern int dissect_nt_quota(tvbuff_t *tvb, proto_tree *tree, int offset, guint16 *bcp);
|
||||||
extern int dissect_nt_user_quota(tvbuff_t *tvb, proto_tree *tree, int offset, guint16 *bcp);
|
extern int dissect_nt_user_quota(tvbuff_t *tvb, proto_tree *tree, int offset, guint16 *bcp);
|
||||||
extern int dissect_nt_get_user_quota(tvbuff_t *tvb, proto_tree *tree, int offset, guint32 *bcp);
|
extern int dissect_nt_get_user_quota(tvbuff_t *tvb, proto_tree *tree, int offset, guint32 *bcp);
|
||||||
|
|
|
@ -3154,7 +3154,7 @@ dissect_smb2_fs_info_05(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *paren
|
||||||
}
|
}
|
||||||
|
|
||||||
bc = tvb_captured_length_remaining(tvb, offset);
|
bc = tvb_captured_length_remaining(tvb, offset);
|
||||||
offset = dissect_qfsi_FS_ATTRIBUTE_INFO(tvb, pinfo, tree, offset, &bc, TRUE);
|
offset = dissect_qfsi_FS_ATTRIBUTE_INFO(tvb, pinfo, tree, offset, &bc);
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue