aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb.c
diff options
context:
space:
mode:
authorsfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>2010-12-23 18:01:28 +0000
committersfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>2010-12-23 18:01:28 +0000
commitd154c873b8c6282834f18fbd7f88019ec818149f (patch)
tree1e44032643379aa070535153e1dca01e01443c16 /epan/dissectors/packet-smb.c
parent62015f07949cedcb8f8bde1f4969fad8a41d9079 (diff)
Proof of concept for using new tvb_get_ephemeral_unicode_stringz(), which was
just introduced in SVN revision 35253. This new function has many more uses in the SMB (and other) dissectors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35254 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-smb.c')
-rw-r--r--epan/dissectors/packet-smb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c
index 399654d752..14472a324b 100644
--- a/epan/dissectors/packet-smb.c
+++ b/epan/dissectors/packet-smb.c
@@ -10897,7 +10897,11 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
COUNT_BYTES_TRANS(4);
/* file name */
- fn = get_unicode_or_ascii_string(tvb, &offset, si->unicode, &fn_len, FALSE, FALSE, &bc);
+ if(si->unicode)
+ fn = tvb_get_ephemeral_unicode_stringz(tvb, offset, &fn_len, ENC_LITTLE_ENDIAN);
+ else
+ fn = tvb_get_ephemeral_stringz(tvb, offset, &fn_len);
+
CHECK_STRING_TRANS(fn);
proto_tree_add_string(tree, hf_smb_file_name, tvb, offset, fn_len,
fn);