aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2011-10-23 22:58:45 +0000
committerBill Meier <wmeier@newsguy.com>2011-10-23 22:58:45 +0000
commitd7a184020418cfa3b62f8983045015b5f9521600 (patch)
treefd74f7a4c2d4a44f5a145561dc897bbb452c128d /epan
parent051d46467f516b623ab4ce039ac06e0f0a5d505f (diff)
Replace use of tvb_get_ephemeral_faked_unicode() by use of tvb_get_ephemeral_unicode_string();
Fix encoding arg as needed. svn path=/trunk/; revision=39530
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-cip.c2
-rw-r--r--epan/dissectors/packet-dcerpc-nt.c4
-rw-r--r--epan/dissectors/packet-dtpt.c2
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c4
-rw-r--r--epan/dissectors/packet-gsm_sms.c4
-rw-r--r--epan/dissectors/packet-kerberos.c2
-rw-r--r--epan/dissectors/packet-ms-mms.c16
-rw-r--r--epan/dissectors/packet-ndps.c2
-rw-r--r--epan/dissectors/packet-ntlmssp.c2
-rw-r--r--epan/dissectors/packet-per.c2
-rw-r--r--epan/dissectors/packet-pnrp.c2
-rw-r--r--epan/dissectors/packet-rdp.c2
-rw-r--r--epan/dissectors/packet-srvloc.c10
-rw-r--r--epan/dissectors/packet-tds.c36
-rw-r--r--epan/dissectors/packet-tnef.c4
-rw-r--r--epan/dissectors/packet-usb.c2
-rw-r--r--epan/dissectors/packet-xml.c2
17 files changed, 49 insertions, 49 deletions
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c
index e3edb9777f..64939e3c50 100644
--- a/epan/dissectors/packet-cip.c
+++ b/epan/dissectors/packet-cip.c
@@ -2914,7 +2914,7 @@ dissect_cip_cco_all_attribute_common( proto_tree *cmd_tree, tvbuff_t *tvb, int o
/* Connection Name */
connection_name_size = tvb_get_guint8( tvb, offset+variable_data_size);
- str_connection_name = tvb_get_ephemeral_faked_unicode(tvb, offset+variable_data_size+2, connection_name_size, ENC_LITTLE_ENDIAN);
+ str_connection_name = tvb_get_ephemeral_unicode_string(tvb, offset+variable_data_size+2, connection_name_size, ENC_LITTLE_ENDIAN);
proto_tree_add_text(cmd_tree, tvb, offset+variable_data_size, connection_name_size+2, "Connection Name: %s", str_connection_name);
variable_data_size += ((connection_name_size*2)+2);
diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c
index 75b61eaddf..512c14de70 100644
--- a/epan/dissectors/packet-dcerpc-nt.c
+++ b/epan/dissectors/packet-dcerpc-nt.c
@@ -1296,9 +1296,9 @@ void cb_wstr_postprocess(packet_info *pinfo, proto_tree *tree _U_,
* some way we can get that string, rather than duplicating the
* efforts of that routine?
*/
- s = tvb_get_ephemeral_faked_unicode(
+ s = tvb_get_ephemeral_unicode_string(
tvb, start_offset + 12, (end_offset - start_offset - 12) / 2,
- TRUE);
+ ENC_LITTLE_ENDIAN);
/* Append string to COL_INFO */
diff --git a/epan/dissectors/packet-dtpt.c b/epan/dissectors/packet-dtpt.c
index 3a488e097c..3ea5f1a4ed 100644
--- a/epan/dissectors/packet-dtpt.c
+++ b/epan/dissectors/packet-dtpt.c
@@ -234,7 +234,7 @@ dissect_dtpt_wstring(tvbuff_t *tvb, guint offset, proto_tree *tree, int hfindex)
guint32 wstring_padding = 0;
wstring_length = tvb_get_letohl(tvb, offset);
- wstring_data = tvb_get_ephemeral_faked_unicode(tvb, offset+4, wstring_length, 1);
+ wstring_data = tvb_get_ephemeral_unicode_string(tvb, offset+4, wstring_length, ENC_LITTLE_ENDIAN);
wstring_size = wstring_length;
if (wstring_size%4) {
wstring_padding = (4-wstring_size%4);
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index 8c079c49cc..709075ed4e 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -729,8 +729,8 @@ de_network_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off
}
else
{
- /* tvb_get_ephemeral_faked_unicode takes the length in number of guint16's */
- net_name = tvb_get_ephemeral_faked_unicode(tvb, curr_offset, ((len - 1) >> 1), ENC_BIG_ENDIAN);
+ /* tvb_get_ephemeral_unicode_string takes the length in number of guint16's */
+ net_name = tvb_get_ephemeral_unicode_string(tvb, curr_offset, ((len - 1) >> 1), ENC_BIG_ENDIAN);
proto_tree_add_text(tree, tvb, curr_offset, len - 1, "Text String: %s", net_name);
}
break;
diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c
index ba4fa0e7ae..249ea9cf63 100644
--- a/epan/dissectors/packet-gsm_sms.c
+++ b/epan/dissectors/packet-gsm_sms.c
@@ -2799,8 +2799,8 @@ dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gb
g_free(utf8_text);
g_iconv_close(cd);
} else {
- /* tvb_get_ephemeral_faked_unicode takes the length in number of guint16's */
- ustr = tvb_get_ephemeral_faked_unicode(tvb, offset, (length>>1), FALSE);
+ /* tvb_get_ephemeral_unicode_string takes the length in number of guint16's */
+ ustr = tvb_get_ephemeral_unicode_string(tvb, offset, (length>>1), ENC_BIG_ENDIAN);
proto_tree_add_text(subtree, tvb, offset, length, "%s", ustr);
}
}
diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c
index 0bb15fd0c8..2e17a6345d 100644
--- a/epan/dissectors/packet-kerberos.c
+++ b/epan/dissectors/packet-kerberos.c
@@ -2819,7 +2819,7 @@ dissect_krb5_PAC_CLIENT_INFO_TYPE(proto_tree *parent_tree, tvbuff_t *tvb, int of
offset+=2;
/* client name */
- name=tvb_get_ephemeral_faked_unicode(tvb, offset, namelen/2, TRUE);
+ name=tvb_get_ephemeral_unicode_string(tvb, offset, namelen/2, ENC_LITTLE_ENDIAN);
proto_tree_add_string(tree, hf_krb_pac_clientname, tvb, offset, namelen, name);
offset+=namelen;
diff --git a/epan/dissectors/packet-ms-mms.c b/epan/dissectors/packet-ms-mms.c
index 79ec91e841..24be0ffbd4 100644
--- a/epan/dissectors/packet-ms-mms.c
+++ b/epan/dissectors/packet-ms-mms.c
@@ -763,7 +763,7 @@ static void dissect_client_transport_info(tvbuff_t *tvb, packet_info *pinfo, pro
offset += 4;
/* Extract and show the string in tree and info column */
- transport_info = tvb_get_ephemeral_faked_unicode(tvb, offset, (length_remaining - 20)/2, TRUE);
+ transport_info = tvb_get_ephemeral_unicode_string(tvb, offset, (length_remaining - 20)/2, ENC_LITTLE_ENDIAN);
proto_tree_add_string_format(tree, hf_msmms_command_client_transport_info, tvb,
offset, length_remaining-20,
@@ -864,7 +864,7 @@ static void dissect_server_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
/* Server version string */
if (server_version_length > 1)
{
- server_version = tvb_get_ephemeral_faked_unicode(tvb, offset, server_version_length, TRUE);
+ server_version = tvb_get_ephemeral_unicode_string(tvb, offset, server_version_length, ENC_LITTLE_ENDIAN);
/* Server version string */
proto_tree_add_string(tree, hf_msmms_command_server_version, tvb,
@@ -880,7 +880,7 @@ static void dissect_server_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
/* Tool version string */
if (tool_version_length > 1)
{
- tool_version = tvb_get_ephemeral_faked_unicode(tvb, offset, tool_version_length, TRUE);
+ tool_version = tvb_get_ephemeral_unicode_string(tvb, offset, tool_version_length, ENC_LITTLE_ENDIAN);
/* Server version string */
proto_tree_add_string(tree, hf_msmms_command_tool_version, tvb,
@@ -892,7 +892,7 @@ static void dissect_server_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
/* Download update player url string */
if (download_update_player_length > 1)
{
- download_update_player = tvb_get_ephemeral_faked_unicode(tvb, offset, download_update_player_length, TRUE);
+ download_update_player = tvb_get_ephemeral_unicode_string(tvb, offset, download_update_player_length, ENC_LITTLE_ENDIAN);
proto_tree_add_string(tree, hf_msmms_command_update_url, tvb,
offset, download_update_player_length*2,
@@ -903,7 +903,7 @@ static void dissect_server_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
/* Password encryption type string */
if (password_encryption_type_length > 1)
{
- password_encryption_type = tvb_get_ephemeral_faked_unicode(tvb, offset, password_encryption_type_length, TRUE);
+ password_encryption_type = tvb_get_ephemeral_unicode_string(tvb, offset, password_encryption_type_length, ENC_LITTLE_ENDIAN);
proto_tree_add_string(tree, hf_msmms_command_password_type, tvb,
offset, password_encryption_type_length*2,
@@ -929,7 +929,7 @@ static void dissect_client_player_info(tvbuff_t *tvb, packet_info *pinfo, proto_
offset += 4;
/* Extract and show the string in tree and info column */
- player_info = tvb_get_ephemeral_faked_unicode(tvb, offset, (length_remaining - 12)/2, TRUE);
+ player_info = tvb_get_ephemeral_unicode_string(tvb, offset, (length_remaining - 12)/2, ENC_LITTLE_ENDIAN);
proto_tree_add_string(tree, hf_msmms_command_client_player_info, tvb,
offset, length_remaining-12,
@@ -1022,7 +1022,7 @@ static void dissect_request_server_file(tvbuff_t *tvb, packet_info *pinfo, proto
offset += 4;
/* File path on server */
- server_file = tvb_get_ephemeral_faked_unicode(tvb, offset, (length_remaining - 16)/2, TRUE);
+ server_file = tvb_get_ephemeral_unicode_string(tvb, offset, (length_remaining - 16)/2, ENC_LITTLE_ENDIAN);
proto_tree_add_string(tree, hf_msmms_command_server_file, tvb,
offset, length_remaining-16,
@@ -1112,7 +1112,7 @@ static void dissect_transport_info_response(tvbuff_t *tvb, proto_tree *tree,
offset += 4;
/* Read this strange string */
- strange_string = tvb_get_ephemeral_faked_unicode(tvb, offset, (length_remaining - 12)/2, TRUE);
+ strange_string = tvb_get_ephemeral_unicode_string(tvb, offset, (length_remaining - 12)/2, ENC_LITTLE_ENDIAN);
proto_tree_add_string(tree, hf_msmms_command_strange_string, tvb,
offset, length_remaining-12,
diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c
index ef85dc70d5..709459b7b3 100644
--- a/epan/dissectors/packet-ndps.c
+++ b/epan/dissectors/packet-ndps.c
@@ -2034,7 +2034,7 @@ ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset, char *
/*
* Unicode.
*/
- string = tvb_get_ephemeral_faked_unicode(tvb, foffset, str_length/2, TRUE);
+ string = tvb_get_ephemeral_unicode_string(tvb, foffset, str_length/2, ENC_LITTLE_ENDIAN);
}
foffset += str_length;
proto_tree_add_string(ndps_tree, hfinfo, tvb, offset, str_length + 4, string);
diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c
index abba774efb..49e6dfe581 100644
--- a/epan/dissectors/packet-ntlmssp.c
+++ b/epan/dissectors/packet-ntlmssp.c
@@ -1284,7 +1284,7 @@ dissect_ntlmssp_target_info_list(tvbuff_t *tvb, proto_tree *tree,
if (content_length > 0) {
const gchar *text;
- text = tvb_get_ephemeral_faked_unicode(tvb, content_offset, content_length / 2, TRUE);
+ text = tvb_get_ephemeral_unicode_string(tvb, content_offset, content_length / 2, ENC_LITTLE_ENDIAN);
proto_tree_add_string(target_info_tree, *hf_array_p[item_type],
tvb, content_offset, content_length, text);
proto_item_append_text(target_info_tf, ": %s", text);
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c
index 97317b017b..0729da0aeb 100644
--- a/epan/dissectors/packet-per.c
+++ b/epan/dissectors/packet-per.c
@@ -771,7 +771,7 @@ dissect_per_BMPString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tre
length=1024;
}
- str = tvb_get_ephemeral_faked_unicode(tvb, offset>>3, length, FALSE);
+ str = tvb_get_ephemeral_unicode_string(tvb, offset>>3, length, ENC_BIG_ENDIAN);
proto_tree_add_string(tree, hf_index, tvb, offset>>3, length*2, str);
diff --git a/epan/dissectors/packet-pnrp.c b/epan/dissectors/packet-pnrp.c
index 63e7518e8f..73cd574d1a 100644
--- a/epan/dissectors/packet-pnrp.c
+++ b/epan/dissectors/packet-pnrp.c
@@ -685,7 +685,7 @@ static int dissect_pnrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Entry Length: Must be 0x0002 */
proto_tree_add_item(pnrp_message_tree, hf_pnrp_message_classifier_entryLength, tvb, offset + 10, 2, ENC_BIG_ENDIAN);
/* The actual classifier String */
- proto_tree_add_text(pnrp_message_tree, tvb, offset + 12, tvb_get_ntohs(tvb,offset+6)-8, "Classifier: %s",tvb_get_ephemeral_faked_unicode(tvb, offset + 12, (tvb_get_ntohs(tvb,offset+6)-8)/2, FALSE));
+ proto_tree_add_text(pnrp_message_tree, tvb, offset + 12, tvb_get_ntohs(tvb,offset+6)-8, "Classifier: %s",tvb_get_ephemeral_unicode_string(tvb, offset + 12, (tvb_get_ntohs(tvb,offset+6)-8)/2, ENC_BIG_ENDIAN));
}
/* There might be padding, so fill up to the next byte */
diff --git a/epan/dissectors/packet-rdp.c b/epan/dissectors/packet-rdp.c
index 88f2d02bb5..1f2f2fbdf5 100644
--- a/epan/dissectors/packet-rdp.c
+++ b/epan/dissectors/packet-rdp.c
@@ -833,7 +833,7 @@ dissect_rdp_fields(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
REPORT_DISSECTOR_BUG("Error!!!!!\n");
if(c->flags & RDP_FI_UNICODE) {
- string = tvb_get_ephemeral_faked_unicode(tvb, offset, len/2, TRUE);
+ string = tvb_get_ephemeral_unicode_string(tvb, offset, len/2, ENC_LITTLE_ENDIAN);
proto_item_append_text(pi, " (%s)", string);
}
diff --git a/epan/dissectors/packet-srvloc.c b/epan/dissectors/packet-srvloc.c
index 5af397d1cf..786bf1a8a2 100644
--- a/epan/dissectors/packet-srvloc.c
+++ b/epan/dissectors/packet-srvloc.c
@@ -416,7 +416,7 @@ add_v1_string(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length,
switch (encoding) {
case CHARSET_ISO_10646_UCS_2:
- unicode_str = tvb_get_ephemeral_faked_unicode(tvb, offset, length/2, FALSE);
+ unicode_str = tvb_get_ephemeral_unicode_string(tvb, offset, length/2, ENC_BIG_ENDIAN);
proto_tree_add_string(tree, hf, tvb, offset, length,
unicode_str);
break;
@@ -439,7 +439,7 @@ add_v1_string(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length,
* does not specify (it is a 16-bit integer space)
*
* Does that mean that in SRVLOC, ISO-10646-UCS-2 is always big-endian?
- * If so, can we just use "tvb_get_ephemeral_faked_unicode()" and be
+ * If so, can we just use "tvb_get_ephemeral_unicode_string()" and be
* done with it?
*
* XXX - this is also used with CHARSET_UTF_8. Is that a cut-and-pasteo?
@@ -545,14 +545,14 @@ attr_list(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length,
break;
}
/* Parse the attribute name */
- tmp = tvb_get_ephemeral_faked_unicode(tvb, offset, (length-offset)/2, FALSE);
+ tmp = tvb_get_ephemeral_unicode_string(tvb, offset, (length-offset)/2, ENC_BIG_ENDIAN);
type_len = (int)strcspn(tmp, "=");
- attr_type = tvb_get_ephemeral_faked_unicode(tvb, offset, type_len, FALSE);
+ attr_type = tvb_get_ephemeral_unicode_string(tvb, offset, type_len, ENC_BIG_ENDIAN);
proto_tree_add_string(tree, hf, tvb, offset, type_len*2, attr_type);
offset += (type_len*2)+2;
/* If this is the attribute svcname */
if (strcmp(attr_type, "svcname-ws")==0) {
- tmp = tvb_get_ephemeral_faked_unicode(tvb, offset, (length-offset)/2, FALSE);
+ tmp = tvb_get_ephemeral_unicode_string(tvb, offset, (length-offset)/2, ENC_BIG_ENDIAN);
type_len = (int)strcspn(tmp, ")");
add_v1_string(tree, hf_srvloc_srvrply_svcname, tvb, offset, type_len*2, encoding);
offset += (type_len*2)+4;
diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c
index 3f1df77bbb..7a696c767c 100644
--- a/epan/dissectors/packet-tds.c
+++ b/epan/dissectors/packet-tds.c
@@ -967,7 +967,7 @@ dissect_tds_query_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
is_unicode = FALSE;
if (is_unicode)
- msg = tvb_get_ephemeral_faked_unicode(tvb, offset, len/2, TRUE);
+ msg = tvb_get_ephemeral_unicode_string(tvb, offset, len/2, ENC_LITTLE_ENDIAN);
else
msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, len);
@@ -986,7 +986,7 @@ dissect_tds5_lang_token(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree
len -= 1;
if (is_unicode)
- msg = tvb_get_ephemeral_faked_unicode(tvb, offset, (len)/2, TRUE);
+ msg = tvb_get_ephemeral_unicode_string(tvb, offset, (len)/2, ENC_LITTLE_ENDIAN);
else
msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, len);
@@ -1149,7 +1149,7 @@ dissect_tds7_login(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (len != 0) {
if( i != 2) {
/* tds 7 is always unicode */
- val = tvb_get_ephemeral_faked_unicode(tvb, offset2, len, TRUE);
+ val = tvb_get_ephemeral_unicode_string(tvb, offset2, len, ENC_LITTLE_ENDIAN);
len *= 2;
proto_tree_add_text(login_tree, tvb, offset2, len, "%s: %s", val_to_str(i, login_field_names, "Unknown"), val);
} else {
@@ -1465,8 +1465,8 @@ dissect_tds_env_chg(tvbuff_t *tvb, guint offset, guint token_sz,
if (env_type != 7) { /* if it's not 'Collation Info - which is not textual! */
string_offset = offset + 2;
if (is_unicode == TRUE) {
- new_val = tvb_get_ephemeral_faked_unicode(tvb, string_offset,
- new_len, TRUE);
+ new_val = tvb_get_ephemeral_unicode_string(tvb, string_offset,
+ new_len, ENC_LITTLE_ENDIAN);
new_len *= 2;
} else
new_val = (gchar*)tvb_get_ephemeral_string(tvb, string_offset, new_len);
@@ -1492,8 +1492,8 @@ dissect_tds_env_chg(tvbuff_t *tvb, guint offset, guint token_sz,
if (old_len) {
string_offset = old_len_offset + 1;
if (is_unicode == TRUE) {
- old_val = tvb_get_ephemeral_faked_unicode(tvb, string_offset,
- old_len, TRUE);
+ old_val = tvb_get_ephemeral_unicode_string(tvb, string_offset,
+ old_len, ENC_LITTLE_ENDIAN);
old_len *= 2;
} else
old_val = (gchar*)tvb_get_ephemeral_string(tvb, string_offset, old_len);
@@ -1525,7 +1525,7 @@ dissect_tds_err_token(tvbuff_t *tvb, guint offset, guint token_sz _U_, proto_tre
is_unicode = TRUE;
if(is_unicode) {
- msg = tvb_get_ephemeral_faked_unicode(tvb, offset, msg_len, TRUE);
+ msg = tvb_get_ephemeral_unicode_string(tvb, offset, msg_len, ENC_LITTLE_ENDIAN);
msg_len *= 2;
} else {
msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, msg_len);
@@ -1539,7 +1539,7 @@ dissect_tds_err_token(tvbuff_t *tvb, guint offset, guint token_sz _U_, proto_tre
offset +=1;
if(srvr_len) {
if (is_unicode) {
- msg = tvb_get_ephemeral_faked_unicode(tvb, offset, srvr_len, TRUE);
+ msg = tvb_get_ephemeral_unicode_string(tvb, offset, srvr_len, ENC_LITTLE_ENDIAN);
srvr_len *=2;
} else {
msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, srvr_len);
@@ -1554,7 +1554,7 @@ dissect_tds_err_token(tvbuff_t *tvb, guint offset, guint token_sz _U_, proto_tre
offset +=1;
if(proc_len) {
if (is_unicode) {
- msg = tvb_get_ephemeral_faked_unicode(tvb, offset, proc_len, TRUE);
+ msg = tvb_get_ephemeral_unicode_string(tvb, offset, proc_len, ENC_LITTLE_ENDIAN);
proc_len *=2;
} else {
msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, proc_len);
@@ -1590,7 +1590,7 @@ dissect_tds_login_ack_token(tvbuff_t *tvb, guint offset, guint token_sz, proto_t
is_unicode = TRUE;
proto_tree_add_text(tree, tvb, offset, 0, "msg_len: %d, token_sz: %d, total: %d",msg_len, token_sz, msg_len + 6U + 3U);
if(is_unicode) {
- msg = tvb_get_ephemeral_faked_unicode(tvb, offset, msg_len, TRUE);
+ msg = tvb_get_ephemeral_unicode_string(tvb, offset, msg_len, ENC_LITTLE_ENDIAN);
msg_len *= 2;
} else {
msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, msg_len);
@@ -1643,7 +1643,7 @@ dissect_tds7_results_token(tvbuff_t *tvb, guint offset, proto_tree *tree)
table_len = tvb_get_letohs(tvb, offset);
offset +=2;
if(table_len != 0) {
- msg = tvb_get_ephemeral_faked_unicode(tvb, offset, table_len, TRUE);
+ msg = tvb_get_ephemeral_unicode_string(tvb, offset, table_len, ENC_LITTLE_ENDIAN);
proto_tree_add_text(tree, tvb, offset, table_len*2, "Table name: %s", msg);
offset += table_len*2;
}
@@ -1671,7 +1671,7 @@ dissect_tds7_results_token(tvbuff_t *tvb, guint offset, proto_tree *tree)
proto_tree_add_text(tree, tvb, offset, 1, "message length: %d",msg_len);
offset += 1;
if(msg_len != 0) {
- msg = tvb_get_ephemeral_faked_unicode(tvb, offset, msg_len, TRUE);
+ msg = tvb_get_ephemeral_unicode_string(tvb, offset, msg_len, ENC_LITTLE_ENDIAN);
proto_tree_add_text(tree, tvb, offset, msg_len*2, "Text: %s", msg);
offset += msg_len*2;
}
@@ -1864,7 +1864,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto
proto_tree_add_item(sub_tree, hf_tds_type_varbyte_data_string, tvb, *offset, length, ENC_ASCII|ENC_NA);
break;
case TDS_DATA_TYPE_NVARCHAR: /* NVarChar */
- string_value = tvb_get_ephemeral_faked_unicode(tvb, *offset, length / 2, TRUE);
+ string_value = tvb_get_ephemeral_unicode_string(tvb, *offset, length / 2, ENC_LITTLE_ENDIAN);
proto_tree_add_string(sub_tree, hf_tds_type_varbyte_data_string, tvb, *offset, length, string_value);
break;
case TDS_DATA_TYPE_XML: /* XML (introduced in TDS 7.2) */
@@ -2018,7 +2018,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto
break;
case TDS_DATA_TYPE_NVARCHAR: /* NVarChar */
case TDS_DATA_TYPE_NCHAR: /* NChar */
- string_value = tvb_get_ephemeral_faked_unicode(tvb, *offset, length / 2, TRUE);
+ string_value = tvb_get_ephemeral_unicode_string(tvb, *offset, length / 2, ENC_LITTLE_ENDIAN);
proto_tree_add_string(sub_tree, hf_tds_type_varbyte_data_string, tvb, *offset, length, string_value);
break;
default:
@@ -2045,7 +2045,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto
else {
switch(data_type) {
case TDS_DATA_TYPE_NTEXT: /* NText */
- string_value = tvb_get_ephemeral_faked_unicode(tvb, *offset, length / 2, TRUE);
+ string_value = tvb_get_ephemeral_unicode_string(tvb, *offset, length / 2, ENC_LITTLE_ENDIAN);
proto_tree_add_string(sub_tree, hf_tds_type_varbyte_data_string, tvb, *offset, length, string_value);
break;
default: /*TODO*/
@@ -2099,7 +2099,7 @@ dissect_tds_rpc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 2;
}
else if (len != 0) {
- val = tvb_get_ephemeral_faked_unicode(tvb, offset, len, TRUE);
+ val = tvb_get_ephemeral_unicode_string(tvb, offset, len, ENC_LITTLE_ENDIAN);
proto_tree_add_string(tree, hf_tds_rpc_name, tvb, offset, len * 2, val);
offset += len * 2;
}
@@ -2128,7 +2128,7 @@ dissect_tds_rpc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(sub_tree, hf_tds_rpc_parameter_name_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
++offset;
if(len) {
- val = tvb_get_ephemeral_faked_unicode(tvb, offset, len, TRUE);
+ val = tvb_get_ephemeral_unicode_string(tvb, offset, len, ENC_LITTLE_ENDIAN);
proto_tree_add_string(sub_tree, hf_tds_rpc_parameter_name, tvb, offset, len * 2, val);
offset += len * 2;
}
diff --git a/epan/dissectors/packet-tnef.c b/epan/dissectors/packet-tnef.c
index 2c95104316..bd5943f3e6 100644
--- a/epan/dissectors/packet-tnef.c
+++ b/epan/dissectors/packet-tnef.c
@@ -271,7 +271,7 @@ static gint dissect_counted_values(tvbuff_t *tvb, gint offset, int hf_id, packe
offset += 4;
if (unicode) {
- char *unicode_str = tvb_get_ephemeral_faked_unicode(tvb, offset, length/2, TRUE);
+ char *unicode_str = tvb_get_ephemeral_unicode_string(tvb, offset, length/2, ENC_LITTLE_ENDIAN);
proto_tree_add_string(tree, hf_id, tvb, offset, length, unicode_str);
} else {
proto_tree_add_item(tree, hf_id, tvb, offset, length, FALSE);
@@ -408,7 +408,7 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
proto_tree_add_item(tag_tree, hf_tnef_property_tag_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- name_string = tvb_get_ephemeral_faked_unicode (tvb, offset, tag_length / 2, TRUE);
+ name_string = tvb_get_ephemeral_unicode_string (tvb, offset, tag_length / 2, ENC_LITTLE_ENDIAN);
proto_tree_add_string_format(tag_tree, hf_tnef_property_tag_name_string, tvb, offset,
tag_length, name_string, "Name: %s", name_string);
offset += tag_length;
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index e40efdc902..746b08d41d 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -1002,7 +1002,7 @@ dissect_usb_string_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, t
char *str;
/* unicode string */
- str=tvb_get_ephemeral_faked_unicode(tvb, offset, (len-2)/2, TRUE);
+ str=tvb_get_ephemeral_unicode_string(tvb, offset, (len-2)/2, ENC_LITTLE_ENDIAN);
proto_tree_add_string(tree, hf_usb_bString, tvb, offset, len-2, str);
offset += len-2;
}
diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c
index 7214279b21..0a185dde1f 100644
--- a/epan/dissectors/packet-xml.c
+++ b/epan/dissectors/packet-xml.c
@@ -231,7 +231,7 @@ static gboolean dissect_xml_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
dissect_xml(tvb, pinfo, tree);
return TRUE;
} else if (pref_heuristic_unicode) {
- const guint8 *data = tvb_get_ephemeral_faked_unicode(tvb, 0, tvb_length(tvb)/2, TRUE);
+ const guint8 *data = tvb_get_ephemeral_unicode_string(tvb, 0, tvb_length(tvb)/2, ENC_LITTLE_ENDIAN);
tvbuff_t *unicode_tvb = tvb_new_real_data(data, tvb_length(tvb)/2, tvb_length(tvb)/2);
if (tvbparse_peek(tvbparse_init(unicode_tvb,0,-1,NULL,want_ignore), want_heur)) {
dissect_xml(unicode_tvb, pinfo, tree);