From d154c873b8c6282834f18fbd7f88019ec818149f Mon Sep 17 00:00:00 2001 From: sfisher Date: Thu, 23 Dec 2010 18:01:28 +0000 Subject: 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 --- epan/dissectors/packet-smb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'epan/dissectors/packet-smb.c') 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); -- cgit v1.2.3