forked from osmocom/wireshark
Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
421d817d70
commit
971ffd683e
|
@ -493,7 +493,7 @@ process_app0_segment(proto_tree *tree, tvbuff_t *tvb, guint32 len,
|
|||
|
||||
proto_tree_add_item(subtree, hf_len, tvb, 2, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
str = tvb_get_stringz(wmem_packet_scope(), tvb, 4, &str_size);
|
||||
str = tvb_get_stringz_enc(wmem_packet_scope(), tvb, 4, &str_size, ENC_ASCII);
|
||||
ti = proto_tree_add_item(subtree, hf_identifier, tvb, 4, str_size, ENC_ASCII|ENC_NA);
|
||||
if (strcmp(str, "JFIF") == 0) {
|
||||
/* Version */
|
||||
|
@ -588,7 +588,7 @@ process_app1_segment(proto_tree *tree, tvbuff_t *tvb, guint32 len,
|
|||
proto_tree_add_item(subtree, hf_len, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
|
||||
str = tvb_get_stringz(wmem_packet_scope(), tvb, offset, &str_size);
|
||||
str = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &str_size, ENC_ASCII);
|
||||
ti = proto_tree_add_item(subtree, hf_identifier, tvb, offset, str_size, ENC_ASCII|ENC_NA);
|
||||
offset += str_size;
|
||||
if (strcmp(str, "Exif") == 0) {
|
||||
|
@ -745,7 +745,7 @@ process_app2_segment(proto_tree *tree, tvbuff_t *tvb, guint32 len,
|
|||
|
||||
proto_tree_add_item(subtree, hf_len, tvb, 2, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
str = tvb_get_stringz(wmem_packet_scope(), tvb, 4, &str_size);
|
||||
str = tvb_get_stringz_enc(wmem_packet_scope(), tvb, 4, &str_size, ENC_ASCII);
|
||||
ti = proto_tree_add_item(subtree, hf_identifier, tvb, 4, str_size, ENC_ASCII|ENC_NA);
|
||||
if (strcmp(str, "FPXR") == 0) {
|
||||
proto_tree_add_text(tree, tvb, 0, -1, "Exif FlashPix APP2 application marker");
|
||||
|
|
|
@ -400,7 +400,7 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
|
|||
expert_add_info(pinfo, sub_item, &ei_incomplete_message);
|
||||
}
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " Fail=<%s>", tvb_get_string(wmem_packet_scope(), tvb, offset, tvb_length_remaining(tvb, offset)));
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " Fail=<%s>", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tvb_length_remaining(tvb, offset), ENC_ASCII));
|
||||
offset = tvb_length(tvb);
|
||||
return offset;
|
||||
}
|
||||
|
|
|
@ -535,7 +535,7 @@ static int dissect_pascal_string(tvbuff_t *tvb, int offset, proto_tree *tree,
|
|||
* code, we could perhaps avoid allocating and freeing
|
||||
* this string buffer.
|
||||
*/
|
||||
tmp = (gchar*)tvb_get_string(wmem_packet_scope(), tvb, offset, len);
|
||||
tmp = (gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
|
||||
item = proto_tree_add_string(tree, hf_index, tvb, offset-1, len+1, tmp);
|
||||
|
||||
subtree = proto_item_add_subtree(item, ett_pstring);
|
||||
|
|
|
@ -6271,11 +6271,11 @@ fCharacterString(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
|
|||
coding = "UTF-8";
|
||||
break;
|
||||
case IBM_MS_DBCS:
|
||||
out = tvb_get_string(wmem_packet_scope(), tvb, offset, l);
|
||||
out = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_ASCII);
|
||||
coding = "IBM MS DBCS";
|
||||
break;
|
||||
case JIS_C_6226:
|
||||
out = tvb_get_string(wmem_packet_scope(), tvb, offset, l);
|
||||
out = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_ASCII);
|
||||
coding = "JIS C 6226";
|
||||
break;
|
||||
case ISO_10646_UCS4:
|
||||
|
|
|
@ -3541,7 +3541,7 @@ dissect_ber_GeneralizedTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree
|
|||
return end_offset;
|
||||
}
|
||||
|
||||
tmpstr = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
|
||||
tmpstr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
|
||||
strptr = str;
|
||||
/* those fields are allways present */
|
||||
strptr += g_snprintf(str, 20, "%.4s-%.2s-%.2s %.2s:%.2s:%.2s",
|
||||
|
@ -3650,11 +3650,11 @@ dissect_ber_UTCTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, t
|
|||
|
||||
if ((len < 10) || (len > 19)) {
|
||||
error_str = wmem_strdup_printf(wmem_packet_scope(), "BER Error: UTCTime invalid length: %u", len);
|
||||
instr = tvb_get_string(wmem_packet_scope(), tvb, offset, len > 19 ? 19 : len);
|
||||
instr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len > 19 ? 19 : len, ENC_ASCII);
|
||||
goto malformed;
|
||||
}
|
||||
|
||||
instr = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
|
||||
instr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
|
||||
|
||||
/* YYMMDDhhmm */
|
||||
for (i=0; i<10; i++) {
|
||||
|
|
|
@ -344,7 +344,7 @@ dissect_bfd_authentication(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
switch (auth_type) {
|
||||
case BFD_AUTH_SIMPLE:
|
||||
if (tree) {
|
||||
password = tvb_get_string(wmem_packet_scope(), tvb, offset+3, auth_len-3);
|
||||
password = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+3, auth_len-3, ENC_ASCII);
|
||||
proto_tree_add_string(auth_tree, hf_bfd_auth_password, tvb, offset+3,
|
||||
auth_len-3, password);
|
||||
proto_item_append_text(auth_item, ": %s", password);
|
||||
|
|
|
@ -512,8 +512,8 @@ dissect_bittorrent_welcome (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
|
|||
for(i = 0; peer_id[i].name != NULL; ++i)
|
||||
{
|
||||
if(tvb_memeql(tvb, offset, peer_id[i].id, (int)strlen(peer_id[i].id)) == 0) {
|
||||
version = tvb_get_string(wmem_packet_scope(), tvb, offset + (int)strlen(peer_id[i].id),
|
||||
peer_id[i].ver_len);
|
||||
version = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + (int)strlen(peer_id[i].id),
|
||||
peer_id[i].ver_len, ENC_ASCII);
|
||||
proto_tree_add_text(tree, tvb, offset, 20, "Client is %s v%s",
|
||||
peer_id[i].name,
|
||||
format_text((guchar*)version, peer_id[i].ver_len));
|
||||
|
|
|
@ -108,7 +108,7 @@ bencoded_string_length(tvbuff_t *tvb, guint *offset_ptr)
|
|||
while(tvb_get_guint8(tvb, offset) != ':')
|
||||
++offset;
|
||||
|
||||
len = atoi(tvb_get_string(wmem_packet_scope(), tvb, start, offset-start));
|
||||
len = atoi(tvb_get_string_enc(wmem_packet_scope(), tvb, start, offset-start, ENC_ASCII));
|
||||
++offset; /* skip the ':' */
|
||||
|
||||
*offset_ptr = offset;
|
||||
|
@ -131,7 +131,7 @@ dissect_bencoded_string(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree,
|
|||
if( tohex )
|
||||
*result = tvb_bytes_to_ep_str(tvb, offset, string_len );
|
||||
else
|
||||
*result = tvb_get_string( wmem_packet_scope(), tvb, offset, string_len );
|
||||
*result = tvb_get_string_enc( wmem_packet_scope(), tvb, offset, string_len , ENC_ASCII);
|
||||
|
||||
proto_tree_add_string_format( tree, hf_bencoded_string, tvb, offset, string_len, *result, "%s: %s", label, *result );
|
||||
offset += string_len;
|
||||
|
@ -154,7 +154,7 @@ dissect_bencoded_int(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, gui
|
|||
while( tvb_get_guint8(tvb,offset)!='e' )
|
||||
offset += 1;
|
||||
|
||||
*result = tvb_get_string( wmem_packet_scope(), tvb, start_offset, offset-start_offset);
|
||||
*result = tvb_get_string_enc( wmem_packet_scope(), tvb, start_offset, offset-start_offset, ENC_ASCII);
|
||||
proto_tree_add_string_format( tree, hf_bencoded_int, tvb, start_offset, offset-start_offset, *result,
|
||||
"%s: %s", label, *result );
|
||||
|
||||
|
|
|
@ -634,7 +634,7 @@ dissect_attribute_entries(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
for (i_entry = 0; i_entry < count; ++i_entry) {
|
||||
attribute_id = tvb_get_ntohl(tvb, offset);
|
||||
value_length = tvb_get_ntohs(tvb, offset + 4 + 2);
|
||||
value = tvb_get_string(NULL, tvb, offset + 4 + 2 + 2, value_length);
|
||||
value = tvb_get_string_enc(NULL, tvb, offset + 4 + 2 + 2, value_length, ENC_ASCII);
|
||||
|
||||
if (attribute_id == 0x01) col_append_fstr(pinfo->cinfo, COL_INFO, " - Title: \"%s\"", value);
|
||||
|
||||
|
@ -672,7 +672,7 @@ dissect_item_mediaplayer(tvbuff_t *tvb, proto_tree *tree, gint offset)
|
|||
|
||||
item_length = tvb_get_ntohs(tvb, offset + 1);
|
||||
displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2);
|
||||
displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2 + 2, displayable_name_length);
|
||||
displayable_name = tvb_get_string_enc(NULL, tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2 + 2, displayable_name_length, ENC_ASCII);
|
||||
|
||||
pitem = proto_tree_add_none_format(tree, hf_btavrcp_player_item, tvb, offset, 1 + 2 + item_length, "Player: %s", displayable_name);
|
||||
ptree = proto_item_add_subtree(pitem, ett_btavrcp_player);
|
||||
|
@ -834,7 +834,7 @@ dissect_item_media_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
item_length = tvb_get_ntohs(tvb, offset + 1);
|
||||
displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 8 + 1 + 2);
|
||||
displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 8 + 1 + 2 + 2, displayable_name_length);
|
||||
displayable_name = tvb_get_string_enc(NULL, tvb, offset + 1 + 2 + 8 + 1 + 2 + 2, displayable_name_length, ENC_ASCII);
|
||||
|
||||
pitem = proto_tree_add_none_format(tree, hf_btavrcp_item , tvb, offset, 1 + 2 + item_length, "Element: %s", displayable_name);
|
||||
ptree = proto_item_add_subtree(pitem, ett_btavrcp_element);
|
||||
|
@ -886,7 +886,7 @@ dissect_item_folder(tvbuff_t *tvb, proto_tree *tree, gint offset)
|
|||
|
||||
item_length = tvb_get_ntohs(tvb, offset + 1);
|
||||
displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 8 + 1 + 1 + 2);
|
||||
displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 8 + 1 + 1 + 2 + 2, displayable_name_length);
|
||||
displayable_name = tvb_get_string_enc(NULL, tvb, offset + 1 + 2 + 8 + 1 + 1 + 2 + 2, displayable_name_length, ENC_ASCII);
|
||||
|
||||
pitem = proto_tree_add_none_format(tree, hf_btavrcp_folder, tvb, offset, 1 + 2 + item_length, "Folder : %s", displayable_name);
|
||||
ptree = proto_item_add_subtree(pitem, ett_btavrcp_folder);
|
||||
|
@ -1909,7 +1909,7 @@ dissect_browsing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
folder_name_length = tvb_get_ntohs(tvb, offset);
|
||||
offset += 2;
|
||||
proto_tree_add_item(ptree, hf_btavrcp_folder_name, tvb, offset, folder_name_length, ENC_NA);
|
||||
folder_name = tvb_get_string(NULL, tvb, offset, folder_name_length);
|
||||
folder_name = tvb_get_string_enc(NULL, tvb, offset, folder_name_length, ENC_ASCII);
|
||||
offset += folder_name_length;
|
||||
proto_item_append_text(pitem, "%s/", folder_name);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s/", folder_name);
|
||||
|
|
|
@ -1809,7 +1809,7 @@ save_local_device_name(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|||
switch(tvb_get_guint8(tvb, offset + i + 1)) {
|
||||
case 0x08: /* Device Name, shortened */
|
||||
case 0x09: /* Device Name, full */
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset + i + 2, length - 1);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + i + 2, length - 1, ENC_ASCII);
|
||||
|
||||
k_interface_id = hci_data->interface_id;
|
||||
k_adapter_id = hci_data->adapter_id;
|
||||
|
@ -2574,7 +2574,7 @@ dissect_host_controller_baseband_cmd(tvbuff_t *tvb, int offset, packet_info *pin
|
|||
k_adapter_id = hci_data->adapter_id;
|
||||
k_frame_number = pinfo->fd->num;
|
||||
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset, 248);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 248, ENC_ASCII);
|
||||
|
||||
key[0].length = 1;
|
||||
key[0].key = &k_interface_id;
|
||||
|
|
|
@ -929,7 +929,7 @@ save_remote_device_name(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|||
switch(tvb_get_guint8(tvb, offset + i + 1)) {
|
||||
case 0x08: /* Device Name, shortened */
|
||||
case 0x09: /* Device Name, full */
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset + i + 2, length - 1);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + i + 2, length - 1, ENC_ASCII);
|
||||
|
||||
k_frame_number = pinfo->fd->num;
|
||||
k_bd_addr_oui = bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
|
||||
|
@ -1267,7 +1267,7 @@ dissect_bthci_evt_remote_name_req_complete(tvbuff_t *tvb, int offset,
|
|||
gchar *name;
|
||||
device_name_t *device_name;
|
||||
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset, 248);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 248, ENC_ASCII);
|
||||
|
||||
k_frame_number = pinfo->fd->num;
|
||||
k_bd_addr_oui = bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
|
||||
|
@ -2337,7 +2337,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset,
|
|||
k_adapter_id = hci_data->adapter_id;
|
||||
k_frame_number = pinfo->fd->num;
|
||||
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset, 248);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 248, ENC_ASCII);
|
||||
|
||||
key[0].length = 1;
|
||||
key[0].key = &k_interface_id;
|
||||
|
|
|
@ -249,7 +249,7 @@ dissect_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
guint8 *id;
|
||||
|
||||
proto_tree_add_item(tree, hf_bthcrp_control_1284_id, tvb, offset, -1, ENC_ASCII | ENC_NA);
|
||||
id = tvb_get_string(NULL, tvb, offset, tvb_length_remaining(tvb, offset));
|
||||
id = tvb_get_string_enc(NULL, tvb, offset, tvb_length_remaining(tvb, offset), ENC_ASCII);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " - 1284 ID: %s", id);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
|
|
@ -1346,7 +1346,7 @@ dissect_bthfp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
|||
|
||||
/* Detect reassemble end character: \r for HS or \n for AG */
|
||||
length = tvb_length(tvb);
|
||||
at_stream = tvb_get_string(wmem_packet_scope(), tvb, 0, length);
|
||||
at_stream = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, length, ENC_ASCII);
|
||||
|
||||
reassemble_start_offset = 0;
|
||||
|
||||
|
|
|
@ -845,7 +845,7 @@ dissect_bthsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
|||
|
||||
/* Detect reassemble end character: \r for HS or \n for AG */
|
||||
length = tvb_length(tvb);
|
||||
at_stream = tvb_get_string(wmem_packet_scope(), tvb, 0, length);
|
||||
at_stream = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, length, ENC_ASCII);
|
||||
|
||||
reassemble_start_offset = 0;
|
||||
|
||||
|
|
|
@ -1360,8 +1360,8 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
}
|
||||
else if (is_ascii_str(tvb_get_ptr(tvb, offset,item_length - 3), item_length - 3))
|
||||
{
|
||||
proto_item_append_text(hdr_tree, " (\"%s\")", tvb_get_string(wmem_packet_scope(), tvb, offset,item_length - 3));
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", tvb_get_string(wmem_packet_scope(), tvb, offset,item_length - 3));
|
||||
proto_item_append_text(hdr_tree, " (\"%s\")", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,item_length - 3, ENC_ASCII));
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,item_length - 3, ENC_ASCII));
|
||||
}
|
||||
|
||||
if (item_length >= 3) /* prevent infinite loops */
|
||||
|
|
|
@ -2279,22 +2279,22 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
switch (attribute) {
|
||||
case 0x300:
|
||||
proto_tree_add_item(next_tree, hf_hcrp_1284_id, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x302:
|
||||
proto_tree_add_item(next_tree, hf_hcrp_device_name, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x304:
|
||||
proto_tree_add_item(next_tree, hf_hcrp_friendly_name, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x306:
|
||||
proto_tree_add_item(next_tree, hf_hcrp_device_location, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
default:
|
||||
|
@ -2316,7 +2316,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x308:
|
||||
proto_tree_add_item(next_tree, hf_wap_homepage_url, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x309:
|
||||
|
@ -2388,7 +2388,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
proto_item_set_len(entry_item, (new_offset - entry_offset) + length);
|
||||
entry_offset = new_offset;
|
||||
proto_tree_add_item(next_tree, hf_hdp_supported_features_mdep_description, tvb, entry_offset, length, ENC_ASCII | ENC_NA);
|
||||
proto_item_append_text(entry_item, ": %s", tvb_get_string(wmem_packet_scope(), tvb, entry_offset, length));
|
||||
proto_item_append_text(entry_item, ": %s", tvb_get_string_enc(wmem_packet_scope(), tvb, entry_offset, length, ENC_ASCII));
|
||||
entry_offset += length;
|
||||
}
|
||||
|
||||
|
@ -2430,12 +2430,12 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
case 0x30D:
|
||||
case 0x200:
|
||||
proto_tree_add_item(next_tree, hf_pan_ipv4_subnet, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x30E:
|
||||
proto_tree_add_item(next_tree, hf_pan_ipv6_subnet, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
default:
|
||||
|
@ -2462,12 +2462,12 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
case 0x30D:
|
||||
case 0x200:
|
||||
proto_tree_add_item(next_tree, hf_pan_ipv4_subnet, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x30E:
|
||||
proto_tree_add_item(next_tree, hf_pan_ipv6_subnet, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
default:
|
||||
|
@ -2519,7 +2519,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x306:
|
||||
proto_tree_add_item(next_tree, hf_dun_escape_sequence, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
default:
|
||||
|
@ -2888,7 +2888,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
switch (attribute) {
|
||||
case 0x350:
|
||||
proto_tree_add_item(next_tree, hf_bpp_document_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x352:
|
||||
|
@ -2898,7 +2898,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x354:
|
||||
proto_tree_add_item(next_tree, hf_bpp_xhtml_print_image_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x356:
|
||||
|
@ -2908,17 +2908,17 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x358:
|
||||
proto_tree_add_item(next_tree, hf_bpp_1284_id, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x35A:
|
||||
proto_tree_add_item(next_tree, hf_bpp_printer_name, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x35C:
|
||||
proto_tree_add_item(next_tree, hf_bpp_printer_location, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x35E:
|
||||
|
@ -2928,7 +2928,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x360:
|
||||
proto_tree_add_item(next_tree, hf_bpp_media_types_supported, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x362:
|
||||
|
@ -2948,7 +2948,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x368:
|
||||
proto_tree_add_item(next_tree, hf_bpp_rui_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x370:
|
||||
|
@ -2963,17 +2963,17 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x374:
|
||||
proto_tree_add_item(next_tree, hf_bpp_reference_printing_top_url, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x376:
|
||||
proto_tree_add_item(next_tree, hf_bpp_direct_printing_top_url, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x37A:
|
||||
proto_tree_add_item(next_tree, hf_bpp_device_name, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
default:
|
||||
|
@ -2984,12 +2984,12 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
switch (attribute) {
|
||||
case 0x368:
|
||||
proto_tree_add_item(next_tree, hf_bpp_rui_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x378:
|
||||
proto_tree_add_item(next_tree, hf_bpp_printer_admin_rui_top_url, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
default:
|
||||
|
@ -3062,7 +3062,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
|
||||
dissect_data_element(entry_tree, &sub_tree, pinfo, tvb, list_offset);
|
||||
list_offset = get_type_length(tvb, list_offset, &entry_length);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, list_offset, entry_length);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, list_offset, entry_length, ENC_ASCII);
|
||||
wmem_strbuf_append_printf(info_buf, "Lang: %s", new_str);
|
||||
proto_item_append_text(entry_item, ": Lang: %s", new_str);
|
||||
proto_tree_add_item(sub_tree, hf_sdp_lang_code, tvb, list_offset, entry_length, ENC_ASCII | ENC_NA);
|
||||
|
@ -3140,17 +3140,17 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x00A:
|
||||
proto_tree_add_item(next_tree, hf_sdp_service_documentation_url, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x00B:
|
||||
proto_tree_add_item(next_tree, hf_sdp_service_client_executable_url, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x00C:
|
||||
proto_tree_add_item(next_tree, hf_sdp_service_icon_url, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x00D:
|
||||
|
@ -3178,17 +3178,17 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x100:
|
||||
proto_tree_add_item(next_tree, hf_sdp_service_name, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x101:
|
||||
proto_tree_add_item(next_tree, hf_sdp_service_description, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x102:
|
||||
proto_tree_add_item(next_tree, hf_sdp_service_provider_name, tvb, offset, size, ENC_ASCII | ENC_NA);
|
||||
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
new_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
default:
|
||||
|
@ -3219,7 +3219,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 8: /* fall through */
|
||||
case 4: {
|
||||
gchar *ptr = (gchar*)tvb_get_string(wmem_packet_scope(), tvb, offset, size);
|
||||
gchar *ptr = (gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_ASCII);
|
||||
|
||||
proto_tree_add_item(next_tree, (type == 8) ? hf_data_element_value_url : hf_data_element_value_string, tvb, offset, size, ENC_NA | ENC_ASCII);
|
||||
wmem_strbuf_append_printf(info_buf, "%s ", ptr);
|
||||
|
|
|
@ -462,7 +462,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
|
|||
user_id = tvb_get_ntohs(tvb, *offset);
|
||||
proto_tree_add_uint(tree, hf_c1222_logon_id, tvb, *offset, 2, user_id);
|
||||
*offset += 2;
|
||||
user_name = tvb_get_string(wmem_packet_scope(),tvb, *offset, 10);
|
||||
user_name = tvb_get_string_enc(wmem_packet_scope(),tvb, *offset, 10, ENC_ASCII);
|
||||
proto_tree_add_string(tree, hf_c1222_logon_user, tvb, *offset, 10, user_name);
|
||||
*offset += 10;
|
||||
*length -= 12;
|
||||
|
@ -474,7 +474,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
|
|||
break;
|
||||
case C1222_CMD_SECURITY:
|
||||
if (*length >= 20) {
|
||||
password = tvb_get_string(wmem_packet_scope(),tvb, *offset, 20);
|
||||
password = tvb_get_string_enc(wmem_packet_scope(),tvb, *offset, 20, ENC_ASCII);
|
||||
proto_tree_add_string(tree, hf_c1222_security_password, tvb, *offset, 20, password);
|
||||
*offset += 20;
|
||||
*length -= 20;
|
||||
|
|
|
@ -1920,7 +1920,7 @@ static void dissect_tty_lines(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
|
|||
int linelen = tvb_find_line_end_unquoted(tvb, offset, -1, &next_offset);
|
||||
|
||||
/* Extract & add the string. */
|
||||
char *string = (char*)tvb_get_string(wmem_packet_scope(), tvb, offset, linelen);
|
||||
char *string = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, linelen, ENC_ASCII);
|
||||
if (isascii(string[0])) {
|
||||
/* If looks printable treat as string... */
|
||||
proto_tree_add_string_format(tty_tree, hf_catapult_dct2000_tty_line,
|
||||
|
@ -2465,7 +2465,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (strcmp(protocol_name, "comment") == 0) {
|
||||
/* Extract & add the string. */
|
||||
proto_item *string_ti;
|
||||
char *string = (char*)tvb_get_string(wmem_packet_scope(), tvb, offset, tvb_length_remaining(tvb, offset));
|
||||
char *string = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tvb_length_remaining(tvb, offset), ENC_ASCII);
|
||||
|
||||
/* Show comment string */
|
||||
string_ti = proto_tree_add_item(dct2000_tree, hf_catapult_dct2000_comment, tvb,
|
||||
|
@ -2492,7 +2492,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
else
|
||||
if (strcmp(protocol_name, "sprint") == 0) {
|
||||
/* Extract & add the string. */
|
||||
char *string = (char*)tvb_get_string(wmem_packet_scope(), tvb, offset, tvb_length_remaining(tvb, offset));
|
||||
char *string = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tvb_length_remaining(tvb, offset), ENC_ASCII);
|
||||
|
||||
/* Show sprint string */
|
||||
proto_tree_add_item(dct2000_tree, hf_catapult_dct2000_sprint, tvb,
|
||||
|
|
|
@ -340,12 +340,12 @@ dissect_gsm_cell_broadcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree *cbs_page_subtree = proto_item_add_subtree(item, ett_gsm_cbs_page_content);
|
||||
len = tvb_length(cbs_page_tvb);
|
||||
proto_tree_add_string(cbs_page_subtree, hf_gsm_cbs_page_content, cbs_page_tvb, 0,
|
||||
text_len, tvb_get_string(wmem_packet_scope(), cbs_page_tvb, 0, text_len));
|
||||
text_len, tvb_get_string_enc(wmem_packet_scope(), cbs_page_tvb, 0, text_len, ENC_ASCII));
|
||||
len -= text_len;
|
||||
if (len)
|
||||
{
|
||||
proto_tree_add_string(cbs_page_subtree, hf_gsm_cbs_page_content_padding, cbs_page_tvb, text_len, len,
|
||||
tvb_get_string(wmem_packet_scope(), cbs_page_tvb, text_len, len));
|
||||
tvb_get_string_enc(wmem_packet_scope(), cbs_page_tvb, text_len, len, ENC_ASCII));
|
||||
}
|
||||
}
|
||||
if (text_len)
|
||||
|
@ -381,7 +381,7 @@ dissect_gsm_cell_broadcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
cbs_msg_item = proto_tree_add_protocol_format(proto_tree_get_root(tree), proto_cell_broadcast, cbs_msg_tvb, 0, len, "GSM Cell Broadcast Message");
|
||||
cbs_msg_tree = proto_item_add_subtree(cbs_msg_item, ett_cbs_msg);
|
||||
|
||||
proto_tree_add_string(cbs_msg_tree, hf_gsm_cbs_message_content, cbs_msg_tvb, 0, len, tvb_get_string(wmem_packet_scope(), cbs_msg_tvb, 0, len));
|
||||
proto_tree_add_string(cbs_msg_tree, hf_gsm_cbs_message_content, cbs_msg_tvb, 0, len, tvb_get_string_enc(wmem_packet_scope(), cbs_msg_tvb, 0, len, ENC_ASCII));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -410,7 +410,7 @@ void dissect_umts_cell_broadcast_message(tvbuff_t *tvb, packet_info *pinfo, prot
|
|||
msg_len = tvb_length(cbs_msg_tvb);
|
||||
cbs_item2 = proto_tree_add_text(cbs_tree, tvb, offset, -1, "Cell Broadcast Message Contents (length: %d)", msg_len);
|
||||
cbs_subtree = proto_item_add_subtree(cbs_item2, ett_cbs_msg);
|
||||
proto_tree_add_text(cbs_subtree, cbs_msg_tvb , 0, tvb_length(cbs_msg_tvb), "%s", tvb_get_string(wmem_packet_scope(), cbs_msg_tvb, 0, msg_len));
|
||||
proto_tree_add_text(cbs_subtree, cbs_msg_tvb , 0, tvb_length(cbs_msg_tvb), "%s", tvb_get_string_enc(wmem_packet_scope(), cbs_msg_tvb, 0, msg_len, ENC_ASCII));
|
||||
}
|
||||
|
||||
/* Register the protocol with Wireshark */
|
||||
|
|
|
@ -705,7 +705,7 @@ static void dissect_cimd_dcs(tvbuff_t *tvb, proto_tree *tree, gint pindex, gint
|
|||
startOffset + 1, CIMD_PC_LENGTH, ENC_ASCII|ENC_NA);
|
||||
|
||||
offset = startOffset + 1 + CIMD_PC_LENGTH + 1;
|
||||
dcs = (guint32) strtoul(tvb_get_string(wmem_packet_scope(), tvb, offset, endOffset - offset), NULL, 10);
|
||||
dcs = (guint32) strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb, offset, endOffset - offset, ENC_ASCII), NULL, 10);
|
||||
proto_tree_add_uint(param_tree, (*vals_hdr_PC[pindex].hf_p), tvb, offset, endOffset - offset, dcs);
|
||||
|
||||
dcs_cg = (dcs & 0xF0) >> 4;
|
||||
|
@ -754,8 +754,8 @@ static void dissect_cimd_error_code( tvbuff_t *tvb, proto_tree *tree, gint pinde
|
|||
|
||||
proto_tree_add_item(param_tree, hf_cimd_pcode_indicator, tvb, startOffset + 1, CIMD_PC_LENGTH, ENC_ASCII|ENC_NA);
|
||||
|
||||
err_code = (guint32) strtoul(tvb_get_string(wmem_packet_scope(), tvb,
|
||||
startOffset + 1 + CIMD_PC_LENGTH + 1, endOffset - (startOffset + 1 + CIMD_PC_LENGTH + 1)),
|
||||
err_code = (guint32) strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb,
|
||||
startOffset + 1 + CIMD_PC_LENGTH + 1, endOffset - (startOffset + 1 + CIMD_PC_LENGTH + 1), ENC_ASCII),
|
||||
NULL, 10);
|
||||
proto_tree_add_uint(param_tree, (*vals_hdr_PC[pindex].hf_p), tvb, startOffset + 1 + CIMD_PC_LENGTH + 1, endOffset - (startOffset + 1 + CIMD_PC_LENGTH + 1), err_code);
|
||||
}
|
||||
|
@ -783,7 +783,7 @@ dissect_cimd_operation(tvbuff_t *tvb, proto_tree *tree, gint etxp, guint16 check
|
|||
if (endOffset == -1)
|
||||
break;
|
||||
|
||||
PC = (guint32) strtoul(tvb_get_string(wmem_packet_scope(), tvb, offset + 1, CIMD_PC_LENGTH), NULL, 10);
|
||||
PC = (guint32) strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, CIMD_PC_LENGTH, ENC_ASCII), NULL, 10);
|
||||
try_val_to_str_idx(PC, cimd_vals_PC, &idx);
|
||||
if (idx != -1 && tree)
|
||||
{
|
||||
|
@ -814,8 +814,8 @@ dissect_cimd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
etxp = tvb_find_guint8(tvb, CIMD_PN_OFFSET + CIMD_PN_LENGTH, -1, CIMD_ETX);
|
||||
if (etxp == -1) return;
|
||||
|
||||
OC = (guint8)strtoul(tvb_get_string(wmem_packet_scope(), tvb, CIMD_OC_OFFSET, CIMD_OC_LENGTH), NULL, 10);
|
||||
PN = (guint8)strtoul(tvb_get_string(wmem_packet_scope(), tvb, CIMD_PN_OFFSET, CIMD_PN_LENGTH), NULL, 10);
|
||||
OC = (guint8)strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb, CIMD_OC_OFFSET, CIMD_OC_LENGTH, ENC_ASCII), NULL, 10);
|
||||
PN = (guint8)strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb, CIMD_PN_OFFSET, CIMD_PN_LENGTH, ENC_ASCII), NULL, 10);
|
||||
|
||||
last1 = tvb_get_guint8(tvb, etxp - 1);
|
||||
last2 = tvb_get_guint8(tvb, etxp - 2);
|
||||
|
@ -826,7 +826,7 @@ dissect_cimd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
} else if (last1 != CIMD_DELIM && last2 != CIMD_DELIM && last3 == CIMD_DELIM) {
|
||||
/* looks valid, it would be nice to check that last1 and last2 are HEXA */
|
||||
/* CC is present */
|
||||
checksum = (guint16)strtoul(tvb_get_string(wmem_packet_scope(), tvb, etxp - 2, 2), NULL, 16);
|
||||
checksum = (guint16)strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb, etxp - 2, 2, ENC_ASCII), NULL, 16);
|
||||
for (; offset < (etxp - 2); offset++)
|
||||
{
|
||||
pkt_check += tvb_get_guint8(tvb, offset);
|
||||
|
@ -871,7 +871,7 @@ dissect_cimd_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
|
|||
}
|
||||
|
||||
/* Try getting the operation-code */
|
||||
opcode = (guint8)strtoul(tvb_get_string(wmem_packet_scope(), tvb, CIMD_OC_OFFSET, CIMD_OC_LENGTH), NULL, 10);
|
||||
opcode = (guint8)strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb, CIMD_OC_OFFSET, CIMD_OC_LENGTH, ENC_ASCII), NULL, 10);
|
||||
if (try_val_to_str(opcode, vals_hdr_OC) == NULL)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ cmpp_octet_string(proto_tree *tree, tvbuff_t *tvb, gint field, gint offset, gint
|
|||
{
|
||||
char *display;
|
||||
|
||||
display = (char *)tvb_get_string(wmem_packet_scope(), tvb, offset, length);
|
||||
display = (char *)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
|
||||
proto_tree_add_string(tree, field, tvb, offset, length, display);
|
||||
return display;
|
||||
}
|
||||
|
|
|
@ -331,7 +331,7 @@ dissect_coap_opt_uri_host(tvbuff_t *tvb, proto_item *head_item, proto_tree *subt
|
|||
{
|
||||
guint8 *str;
|
||||
|
||||
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
|
||||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, opt_length, ENC_ASCII);
|
||||
|
||||
proto_tree_add_string(subtree, hf_coap_opt_uri_host, tvb, offset, opt_length, str);
|
||||
|
||||
|
@ -362,7 +362,7 @@ dissect_coap_opt_uri_path(tvbuff_t *tvb, proto_item *head_item, proto_tree *subt
|
|||
if (opt_length == 0) {
|
||||
str = nullstr;
|
||||
} else {
|
||||
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
|
||||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, opt_length, ENC_ASCII);
|
||||
g_strlcat(coap_uri_str, str, sizeof(coap_uri_str));
|
||||
}
|
||||
|
||||
|
@ -385,7 +385,7 @@ dissect_coap_opt_uri_query(tvbuff_t *tvb, proto_item *head_item,proto_tree *subt
|
|||
if (opt_length == 0) {
|
||||
str = nullstr;
|
||||
} else {
|
||||
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
|
||||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, opt_length, ENC_ASCII);
|
||||
g_strlcat(coap_uri_str, str, sizeof(coap_uri_str));
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ dissect_coap_opt_location_path(tvbuff_t *tvb, proto_item *head_item, proto_tree
|
|||
if (opt_length == 0) {
|
||||
str = nullstr;
|
||||
} else {
|
||||
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
|
||||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, opt_length, ENC_ASCII);
|
||||
}
|
||||
|
||||
proto_tree_add_string(subtree, hf_coap_opt_location_path, tvb, offset, opt_length, str);
|
||||
|
@ -420,7 +420,7 @@ dissect_coap_opt_location_query(tvbuff_t *tvb, proto_item *head_item, proto_tree
|
|||
if (opt_length == 0) {
|
||||
str = nullstr;
|
||||
} else {
|
||||
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
|
||||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, opt_length, ENC_ASCII);
|
||||
}
|
||||
|
||||
proto_tree_add_string(subtree, hf_coap_opt_location_query, tvb, offset, opt_length, str);
|
||||
|
@ -437,7 +437,7 @@ dissect_coap_opt_proxy_uri(tvbuff_t *tvb, proto_item *head_item, proto_tree *sub
|
|||
if (opt_length == 0) {
|
||||
str = nullstr;
|
||||
} else {
|
||||
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
|
||||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, opt_length, ENC_ASCII);
|
||||
}
|
||||
|
||||
proto_tree_add_string(subtree, hf_coap_opt_proxy_uri, tvb, offset, opt_length, str);
|
||||
|
|
|
@ -395,7 +395,7 @@ dissect_collectd_string (tvbuff_t *tvb, packet_info *pinfo, gint type_hf,
|
|||
*ret_offset = offset + 4;
|
||||
*ret_length = length - 4;
|
||||
|
||||
*ret_string = tvb_get_string (wmem_packet_scope(), tvb, *ret_offset, *ret_length);
|
||||
*ret_string = tvb_get_string_enc(wmem_packet_scope(), tvb, *ret_offset, *ret_length, ENC_ASCII);
|
||||
|
||||
pi = proto_tree_add_text (tree_root, tvb, offset, length,
|
||||
"collectd %s segment: \"%s\"",
|
||||
|
@ -1007,8 +1007,8 @@ dissect_collectd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
switch (part_type) {
|
||||
case TYPE_HOST:
|
||||
vdispatch.host = tvb_get_string (wmem_packet_scope(), tvb,
|
||||
offset + 4, part_length - 4);
|
||||
vdispatch.host = tvb_get_string_enc(wmem_packet_scope(), tvb,
|
||||
offset + 4, part_length - 4, ENC_ASCII);
|
||||
if (pkt_host == NULL)
|
||||
pkt_host = vdispatch.host;
|
||||
break;
|
||||
|
@ -1016,15 +1016,15 @@ dissect_collectd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
case TYPE_TIME_HR:
|
||||
break;
|
||||
case TYPE_PLUGIN:
|
||||
vdispatch.plugin = tvb_get_string (wmem_packet_scope(), tvb,
|
||||
offset + 4, part_length - 4);
|
||||
vdispatch.plugin = tvb_get_string_enc(wmem_packet_scope(), tvb,
|
||||
offset + 4, part_length - 4, ENC_ASCII);
|
||||
pkt_plugins++;
|
||||
break;
|
||||
case TYPE_PLUGIN_INSTANCE:
|
||||
break;
|
||||
case TYPE_TYPE:
|
||||
vdispatch.type = tvb_get_string (wmem_packet_scope(), tvb,
|
||||
offset + 4, part_length - 4);
|
||||
vdispatch.type = tvb_get_string_enc(wmem_packet_scope(), tvb,
|
||||
offset + 4, part_length - 4, ENC_ASCII);
|
||||
break;
|
||||
case TYPE_TYPE_INSTANCE:
|
||||
break;
|
||||
|
|
|
@ -2855,7 +2855,7 @@ info_to_display(tvbuff_t *tvb, proto_item *stt, int offset, int octets, const ch
|
|||
|
||||
/* Special section for printing strings */
|
||||
if (mode==FMT_STR) {
|
||||
codestr = tvb_get_string(wmem_packet_scope(), tvb, offset, octets);
|
||||
codestr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, octets, ENC_ASCII);
|
||||
pi = proto_tree_add_string_format(stt, *hf_proto_parameter, tvb,
|
||||
offset, octets, codestr, "%-28s : %s", str, codestr);
|
||||
return pi;
|
||||
|
|
|
@ -309,7 +309,7 @@ dissect_dbus_sig(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset
|
|||
len = dinfo->get32(tvb, offset);
|
||||
offset += 4;
|
||||
|
||||
val = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
|
||||
val = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
|
||||
offset += (len + 1 /* NUL-byte */ + 3) & ~3;
|
||||
|
||||
if (sig == 's') {
|
||||
|
@ -337,7 +337,7 @@ dissect_dbus_sig(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset
|
|||
len = tvb_get_guint8(tvb, offset);
|
||||
offset += 1;
|
||||
|
||||
val = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
|
||||
val = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
|
||||
offset += (len + 1);
|
||||
|
||||
ti = proto_tree_add_string_format(tree, hfi_dbus_value_str.id, tvb, org_offset, offset - org_offset, val, "SIGNATURE: %s", val);
|
||||
|
@ -368,7 +368,7 @@ dissect_dbus_field_signature(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree
|
|||
|
||||
/* sig_len = tvb_strsize(tvb, offset); */
|
||||
|
||||
sig = tvb_get_string(wmem_packet_scope(), tvb, offset, sig_len);
|
||||
sig = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, sig_len, ENC_ASCII);
|
||||
offset += (sig_len + 1);
|
||||
|
||||
ti = proto_tree_add_string(tree, &hfi_dbus_type_signature, tvb, org_offset, offset - org_offset, sig);
|
||||
|
|
|
@ -180,7 +180,7 @@ epm_dissect_ept_entry_t(tvbuff_t *tvb, int offset,
|
|||
hf_epm_ann_offset, NULL);
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
|
||||
hf_epm_ann_len, &len);
|
||||
str=tvb_get_string(wmem_packet_scope(), tvb, offset, len);
|
||||
str=tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
|
||||
proto_tree_add_item(tree, hf_epm_annotation, tvb, offset, len, ENC_ASCII|ENC_NA);
|
||||
offset += len;
|
||||
|
||||
|
@ -429,17 +429,17 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
|
|||
|
||||
case PROTO_ID_NAMED_PIPES: /* \\PIPE\xxx named pipe */
|
||||
proto_tree_add_item(tr, hf_epm_proto_named_pipes, tvb, offset, len, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(tr, "NamedPipe:%s", tvb_get_string(wmem_packet_scope(), tvb, offset, len));
|
||||
proto_item_append_text(tr, "NamedPipe:%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII));
|
||||
break;
|
||||
|
||||
case PROTO_ID_NAMED_PIPES_2: /* PIPENAME named pipe */
|
||||
proto_tree_add_item(tr, hf_epm_proto_named_pipes, tvb, offset, len, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(tr, "PIPE:%s", tvb_get_string(wmem_packet_scope(), tvb, offset, len));
|
||||
proto_item_append_text(tr, "PIPE:%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII));
|
||||
break;
|
||||
|
||||
case PROTO_ID_NETBIOS: /* \\NETBIOS netbios name */
|
||||
proto_tree_add_item(tr, hf_epm_proto_netbios_name, tvb, offset, len, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(tr, "NetBIOS:%s", tvb_get_string(wmem_packet_scope(), tvb, offset, len));
|
||||
proto_item_append_text(tr, "NetBIOS:%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII));
|
||||
break;
|
||||
case PROTO_ID_HTTP: /* RPC over HTTP */
|
||||
proto_tree_add_item(tr, hf_epm_proto_http_port, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -580,7 +580,7 @@ typedef [string] byte NameString_t[AFS_NAMEMAX];
|
|||
if (string_size < AFS_NAMEMAX)
|
||||
{
|
||||
proto_tree_add_item (tree, hf_fileexp_afsNameString_t_principalName_string, tvb, offset, string_size, ENC_ASCII|ENC_NA);
|
||||
namestring = tvb_get_string (wmem_packet_scope(), tvb, offset, string_size);
|
||||
namestring = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_size, ENC_ASCII);
|
||||
offset += string_size;
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring);
|
||||
}
|
||||
|
@ -755,7 +755,7 @@ dissect_afsTaggedPath (tvbuff_t * tvb, int offset,
|
|||
hf_fileexp_afsTaggedPath_tp_length, &tp_length);
|
||||
proto_tree_add_item (tree, hf_fileexp_afsTaggedPath_tp_chars, tvb, offset,
|
||||
tp_length, ENC_ASCII|ENC_NA);
|
||||
tp_chars = tvb_get_string (wmem_packet_scope(), tvb, offset, 1025);
|
||||
tp_chars = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 1025, ENC_ASCII);
|
||||
offset += 1025;
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " :tp_chars %s", tp_chars);
|
||||
|
||||
|
@ -1312,7 +1312,7 @@ dissect_afstaggedname (tvbuff_t * tvb, int offset,
|
|||
{
|
||||
proto_tree_add_item (tree, hf_fileexp_tn_string, tvb, offset,
|
||||
tn_length, ENC_ASCII|ENC_NA);
|
||||
tn_string = tvb_get_string (wmem_packet_scope(), tvb, offset, 257);
|
||||
tn_string = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 257, ENC_ASCII);
|
||||
offset += 257;
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " :tn_tag: %s", tn_string);
|
||||
}
|
||||
|
|
|
@ -341,7 +341,7 @@ dissect_vlconf_cell (tvbuff_t * tvb, int offset,
|
|||
|
||||
/* byte name[MAXVLCELLCHARS]; Cell name */
|
||||
proto_tree_add_item (tree, hf_fldb_vlconf_cell_name, tvb, offset, 114, ENC_ASCII|ENC_NA);
|
||||
name = tvb_get_string (wmem_packet_scope(), tvb, offset, MAXVLCELLCHARS); /* XXX why 114 above and 128 here?? */
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, MAXVLCELLCHARS, ENC_ASCII); /* XXX why 114 above and 128 here?? */
|
||||
offset += MAXVLCELLCHARS; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " Name: %s", name);
|
||||
|
||||
|
@ -377,7 +377,7 @@ dissect_vlconf_cell (tvbuff_t * tvb, int offset,
|
|||
{
|
||||
proto_tree_add_item (tree, hf_fldb_vlconf_cell_hostname, tvb, offset,
|
||||
64, ENC_ASCII|ENC_NA);
|
||||
hostname = tvb_get_string (wmem_packet_scope(), tvb, offset, 64);
|
||||
hostname = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 64, ENC_ASCII);
|
||||
offset += 64; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " hostName: %s", hostname);
|
||||
}
|
||||
|
@ -460,7 +460,7 @@ typedef [string] byte NameString_t[AFS_NAMEMAX];
|
|||
proto_tree_add_item (tree,
|
||||
hf_fldb_afsNameString_t_principalName_string,
|
||||
tvb, offset, string_size, ENC_ASCII|ENC_NA);
|
||||
namestring = tvb_get_string (wmem_packet_scope(), tvb, offset, string_size);
|
||||
namestring = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_size, ENC_ASCII);
|
||||
offset += string_size;
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring);
|
||||
}
|
||||
|
@ -684,7 +684,7 @@ dissect_vldbentry (tvbuff_t * tvb, int offset,
|
|||
|
||||
proto_tree_add_item (tree, hf_fldb_vldbentry_volumename, tvb, offset, 114,
|
||||
ENC_ASCII|ENC_NA);
|
||||
volumename = tvb_get_string (wmem_packet_scope(), tvb, offset, 114);
|
||||
volumename = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 114, ENC_ASCII);
|
||||
offset += 110; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " Name: %s", volumename);
|
||||
|
||||
|
@ -746,7 +746,7 @@ dissect_vldbentry (tvbuff_t * tvb, int offset,
|
|||
{
|
||||
proto_tree_add_item (tree, hf_fldb_vldbentry_siteprincipal, tvb,
|
||||
offset, 64, ENC_ASCII|ENC_NA);
|
||||
siteprincipal = tvb_get_string (wmem_packet_scope(), tvb, offset, 64);
|
||||
siteprincipal = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 64, ENC_ASCII);
|
||||
offset += 64;
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " Princ: %s", siteprincipal);
|
||||
}
|
||||
|
@ -908,14 +908,14 @@ dissect_vldbentry (tvbuff_t * tvb, int offset,
|
|||
/* byte LockerName[MAXLOCKNAMELEN]; */
|
||||
proto_tree_add_item (tree, hf_fldb_vldbentry_lockername, tvb, offset,
|
||||
MAXLOCKNAMELEN, ENC_ASCII|ENC_NA);
|
||||
lockername = tvb_get_string (wmem_packet_scope(), tvb, offset, MAXLOCKNAMELEN);
|
||||
lockername = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, MAXLOCKNAMELEN, ENC_ASCII);
|
||||
offset += MAXLOCKNAMELEN; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " LockerName: %s", lockername);
|
||||
|
||||
/* byte charSpares[50]; */
|
||||
proto_tree_add_item (tree, hf_fldb_vldbentry_charspares, tvb, offset, 50,
|
||||
ENC_ASCII|ENC_NA);
|
||||
charspares = tvb_get_string (wmem_packet_scope(), tvb, offset, 50);
|
||||
charspares = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 50, ENC_ASCII);
|
||||
offset += 50; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " charSpares:%s", charspares);
|
||||
|
||||
|
@ -1057,7 +1057,7 @@ fldb_dissect_getsiteinfo_resp (tvbuff_t * tvb, int offset,
|
|||
offset += 48; /* part of kerbprin before name... */
|
||||
|
||||
proto_tree_add_item (tree, hf_fldb_namestring, tvb, offset, 64, ENC_ASCII|ENC_NA);
|
||||
namestring = tvb_get_string (wmem_packet_scope(), tvb, offset, 64);
|
||||
namestring = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 64, ENC_ASCII);
|
||||
offset += 64;
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " %s", namestring);
|
||||
|
||||
|
|
|
@ -1287,8 +1287,8 @@ void cb_str_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_string(wmem_packet_scope(),
|
||||
tvb, start_offset + 12, (end_offset - start_offset - 12) );
|
||||
s = tvb_get_string_enc(wmem_packet_scope(),
|
||||
tvb, start_offset + 12, (end_offset - start_offset - 12), ENC_ASCII);
|
||||
|
||||
/* Append string to COL_INFO */
|
||||
|
||||
|
|
|
@ -77,13 +77,13 @@ rpriv_dissect_get_eptgt_rqst (tvbuff_t *tvb, int offset,
|
|||
/* advance to get size of cell, and princ */
|
||||
|
||||
proto_tree_add_item (tree, hf_rpriv_get_eptgt_rqst_key_t, tvb, offset, key_size, ENC_ASCII|ENC_NA);
|
||||
key_t1 = tvb_get_string(wmem_packet_scope(), tvb, offset, key_size);
|
||||
key_t1 = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, key_size, ENC_ASCII);
|
||||
offset += key_size;
|
||||
|
||||
offset += 8;
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_rpriv_get_eptgt_rqst_key_size2, &key_size2);
|
||||
proto_tree_add_item (tree, hf_rpriv_get_eptgt_rqst_key_t2, tvb, offset, key_size2, ENC_ASCII|ENC_NA);
|
||||
key_t2 = tvb_get_string(wmem_packet_scope(), tvb, offset, key_size2);
|
||||
key_t2 = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, key_size2, ENC_ASCII);
|
||||
offset += key_size2;
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ rs_acct_dissect_lookup_rqst (tvbuff_t *tvb, int offset,
|
|||
|
||||
if (key_size){ /* Not able to yet decipher the OTHER versions of this call just yet. */
|
||||
proto_tree_add_item (tree, hf_rs_acct_lookup_rqst_key_t, tvb, offset, key_size, ENC_ASCII|ENC_NA);
|
||||
keyx_t = tvb_get_string(wmem_packet_scope(), tvb, offset, key_size);
|
||||
keyx_t = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, key_size, ENC_ASCII);
|
||||
offset += key_size;
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO,
|
||||
|
@ -95,7 +95,7 @@ rs_acct_dissect_get_projlist_rqst (tvbuff_t *tvb, int offset,
|
|||
|
||||
proto_tree_add_item (tree, hf_rs_acct_get_projlist_rqst_key_t,
|
||||
tvb, offset, key_size, ENC_ASCII|ENC_NA);
|
||||
keyx_t = tvb_get_string(wmem_packet_scope(), tvb, offset, key_size);
|
||||
keyx_t = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, key_size, ENC_ASCII);
|
||||
offset += key_size;
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO,
|
||||
|
|
|
@ -64,7 +64,7 @@ rs_misc_dissect_login_get_info_rqst (tvbuff_t *tvb, int offset,
|
|||
if (key_size){ /* Not able to yet decipher the OTHER versions of this call just yet. */
|
||||
|
||||
proto_tree_add_item (tree, hf_rs_misc_login_get_info_rqst_key_t, tvb, offset, key_size, ENC_ASCII|ENC_NA);
|
||||
key_t1 = tvb_get_string(wmem_packet_scope(), tvb, offset, key_size);
|
||||
key_t1 = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, key_size, ENC_ASCII);
|
||||
offset += key_size;
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO,
|
||||
|
|
|
@ -198,7 +198,7 @@ dissect sec_rgy_pname const signed32 sec_rgy_pname_t_size = 257; * In
|
|||
if (string_size > 1)
|
||||
{
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s",
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, string_size));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_size, ENC_ASCII));
|
||||
}
|
||||
offset += string_size;
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ dissect_sec_rgy_name_t (tvbuff_t * tvb, int offset,
|
|||
if (string_size > 1)
|
||||
{
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s",
|
||||
tvb_get_string (wmem_packet_scope(), tvb, offset, string_size));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_size, ENC_ASCII));
|
||||
}
|
||||
offset += string_size;
|
||||
}
|
||||
|
|
|
@ -4927,7 +4927,7 @@ dissect_dcm_assoc_item(tvbuff_t *tvb, proto_tree *tree, guint32 offset,
|
|||
|
||||
switch (item_value_type) {
|
||||
case DCM_ITEM_VALUE_TYPE_UID:
|
||||
*item_value = (gchar *)tvb_get_string(wmem_packet_scope(), tvb, offset+4, item_len);
|
||||
*item_value = (gchar *)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, item_len, ENC_ASCII);
|
||||
|
||||
uid = (dcm_uid_t *)g_hash_table_lookup(dcm_uid_table, (gpointer) *item_value);
|
||||
if (uid) {
|
||||
|
@ -4945,7 +4945,7 @@ dissect_dcm_assoc_item(tvbuff_t *tvb, proto_tree *tree, guint32 offset,
|
|||
break;
|
||||
|
||||
case DCM_ITEM_VALUE_TYPE_STRING:
|
||||
*item_value = (gchar *)tvb_get_string(wmem_packet_scope(), tvb, offset+4, item_len);
|
||||
*item_value = (gchar *)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, item_len, ENC_ASCII);
|
||||
proto_item_append_text(assoc_item_pitem, "%s", *item_value);
|
||||
proto_tree_add_string(assoc_item_ptree, *hf_value, tvb, offset+4, item_len, *item_value);
|
||||
|
||||
|
@ -4998,7 +4998,7 @@ dissect_dcm_assoc_sopclass_extneg(tvbuff_t *tvb, proto_tree *tree, guint32 offse
|
|||
proto_tree_add_item(assoc_item_extneg_tree, hf_dcm_assoc_item_len, tvb, offset+2, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(assoc_item_extneg_tree, hf_dcm_info_extneg_sopclassuid_len, tvb, offset+4, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
sopclassuid_str = (gchar *)tvb_get_string(wmem_packet_scope(), tvb, offset+6, sop_class_uid_len);
|
||||
sopclassuid_str = (gchar *)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+6, sop_class_uid_len, ENC_ASCII);
|
||||
sopclassuid = (dcm_uid_t *)g_hash_table_lookup(dcm_uid_table, (gpointer) sopclassuid_str);
|
||||
|
||||
if (sopclassuid) {
|
||||
|
@ -5100,7 +5100,7 @@ dissect_dcm_assoc_role_selection(tvbuff_t *tvb, proto_tree *tree, guint32 offset
|
|||
proto_tree_add_item(assoc_item_rolesel_tree, hf_dcm_assoc_item_len, tvb, offset+2, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(assoc_item_rolesel_tree, hf_dcm_info_rolesel_sopclassuid_len, tvb, offset+4, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
sopclassuid_str = (gchar *)tvb_get_string(wmem_packet_scope(), tvb, offset+6, sop_class_uid_len);
|
||||
sopclassuid_str = (gchar *)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+6, sop_class_uid_len, ENC_ASCII);
|
||||
sopclassuid = (dcm_uid_t *)g_hash_table_lookup(dcm_uid_table, (gpointer) sopclassuid_str);
|
||||
|
||||
scu_role = tvb_get_guint8(tvb, offset+6+sop_class_uid_len);
|
||||
|
@ -6202,7 +6202,7 @@ dissect_dcm_tag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
/* Controlled exit, if VR does not fit. */
|
||||
if (dcm_tag_is_open(pdv, offset_tag, offset_vr, endpos, 2)) return endpos;
|
||||
|
||||
vr = (gchar *)tvb_get_string(wmem_packet_scope(), tvb, offset, 2);
|
||||
vr = (gchar *)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 2, ENC_ASCII);
|
||||
offset += 2;
|
||||
|
||||
g_free(pdv->open_tag.vr);
|
||||
|
|
|
@ -196,7 +196,7 @@ dissect_dcp_etsi (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void *
|
|||
dcp_tree = proto_item_add_subtree (ti, ett_edcp);
|
||||
}
|
||||
|
||||
sync = tvb_get_string (wmem_packet_scope(), tvb, 0, 2);
|
||||
sync = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, 2, ENC_ASCII);
|
||||
dissector_try_string(dcp_dissector_table, (char*)sync, tvb, pinfo, dcp_tree, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -618,14 +618,14 @@ dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
while(offset<tvb_length(tvb)) {
|
||||
guint32 bits;
|
||||
guint32 bytes;
|
||||
char *tag = (char*)tvb_get_string (wmem_packet_scope(), tvb, offset, 4); offset += 4;
|
||||
char *tag = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 4, ENC_ASCII); offset += 4;
|
||||
bits = tvb_get_ntohl(tvb, offset); offset += 4;
|
||||
bytes = bits / 8;
|
||||
if(bits % 8)
|
||||
bytes++;
|
||||
|
||||
if(strcmp(tag, "*ptr")==0) {
|
||||
prot = (char*)tvb_get_string (wmem_packet_scope(), tvb, offset, 4);
|
||||
prot = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 4, ENC_ASCII);
|
||||
maj = tvb_get_ntohs(tvb, offset+4);
|
||||
min = tvb_get_ntohs(tvb, offset+6);
|
||||
proto_tree_add_bytes_format(tpl_tree, hf_tpl_tlv, tvb,
|
||||
|
|
|
@ -569,7 +569,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
|
|||
* XXX - if this is truly like DHCP option 81,
|
||||
* we need to dissect it as such.
|
||||
*/
|
||||
proto_item_append_text(oi,", \"%s\"", tvb_get_string(wmem_packet_scope(), tvb, offset, option_length));
|
||||
proto_item_append_text(oi,", \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, option_length, ENC_ASCII));
|
||||
|
||||
proto_tree_add_item(option_tree,
|
||||
hf_dhcpfo_client_identifier, tvb, offset,
|
||||
|
@ -634,7 +634,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
|
|||
|
||||
case DHCP_FO_PD_VENDOR_CLASS:
|
||||
vendor_class_str =
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, option_length);
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, option_length, ENC_ASCII);
|
||||
proto_item_append_text(oi,", \"%s\"",
|
||||
format_text(vendor_class_str, option_length));
|
||||
proto_tree_add_string(option_tree,
|
||||
|
|
|
@ -1019,7 +1019,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i
|
|||
opt_len = tlv_len;
|
||||
field_len = tlv_len;
|
||||
|
||||
device_type = tvb_get_string(wmem_packet_scope(), tvb, sub_off, field_len);
|
||||
device_type = tvb_get_string_enc(wmem_packet_scope(), tvb, sub_off, field_len, ENC_ASCII);
|
||||
|
||||
if ((device_type == NULL) || (strlen(device_type) == 0)) {
|
||||
proto_item_append_text(ti, "Packet does not contain Device Type.");
|
||||
|
|
|
@ -1649,7 +1649,7 @@ static void dmp_add_seq_ack_analysis (tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
static gchar *dissect_7bit_string (tvbuff_t *tvb, gint offset, gint length)
|
||||
{
|
||||
guchar *encoded = tvb_get_string (wmem_packet_scope(), tvb, offset, length);
|
||||
guchar *encoded = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
|
||||
guchar *decoded = (guchar *)wmem_alloc0 (wmem_packet_scope(), (size_t)(length * 1.2) + 1);
|
||||
guchar rest = 0, bits = 1;
|
||||
gint len = 0, i;
|
||||
|
@ -3046,12 +3046,12 @@ static void dissect_dmp_structured_id (tvbuff_t *tvb, proto_tree *body_tree,
|
|||
break;
|
||||
|
||||
case STRUCT_ID_STRING:
|
||||
dmp.struct_id = tvb_get_string (wmem_packet_scope(), tvb, offset, (gint) dmp_struct_length);
|
||||
dmp.struct_id = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, (gint) dmp_struct_length, ENC_ASCII);
|
||||
proto_tree_add_item (body_tree, hf_message_bodyid_string, tvb, offset, dmp_struct_length, ENC_ASCII|ENC_NA);
|
||||
break;
|
||||
|
||||
case STRUCT_ID_ZSTRING:
|
||||
dmp.struct_id = tvb_get_stringz (wmem_packet_scope(), tvb, offset, &length);
|
||||
dmp.struct_id = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII);
|
||||
proto_tree_add_item (body_tree, hf_message_bodyid_zstring, tvb, offset, length, ENC_ASCII|ENC_NA);
|
||||
break;
|
||||
|
||||
|
@ -3078,7 +3078,7 @@ static gint dissect_dmp_message (tvbuff_t *tvb, packet_info *pinfo,
|
|||
if (dmp.body_format == FREE_TEXT_SUBJECT) {
|
||||
len = tvb_strsize (tvb, offset);
|
||||
if (dmp_subject_as_id) {
|
||||
dmp.struct_id = tvb_get_string (wmem_packet_scope(), tvb, offset, len);
|
||||
dmp.struct_id = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
|
||||
}
|
||||
proto_tree_add_item (message_tree, hf_message_subject, tvb, offset, len, ENC_ASCII|ENC_NA);
|
||||
offset += len;
|
||||
|
|
|
@ -1948,8 +1948,8 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset,
|
|||
da_len = tvb_get_guint8(tvb, offset+1);
|
||||
proto_tree_add_item(point_tree, hf_dnp3_al_da_length, tvb, offset+1, 1, ENC_LITTLE_ENDIAN);
|
||||
|
||||
proto_tree_add_text(point_tree, tvb, offset+2, da_len, "Value: %s", tvb_get_string(wmem_packet_scope(), tvb, offset+2, da_len));
|
||||
proto_item_append_text(object_item, ", Value: %s", tvb_get_string(wmem_packet_scope(), tvb, offset+2, da_len));
|
||||
proto_tree_add_text(point_tree, tvb, offset+2, da_len, "Value: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset+2, da_len, ENC_ASCII));
|
||||
proto_item_append_text(object_item, ", Value: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset+2, da_len, ENC_ASCII));
|
||||
|
||||
offset += 2 + da_len;
|
||||
|
||||
|
@ -2678,7 +2678,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset,
|
|||
if (al_filename_len > 0) {
|
||||
const gchar *al_filename;
|
||||
|
||||
al_filename = tvb_get_string(wmem_packet_scope(), tvb, data_pos, al_filename_len);
|
||||
al_filename = tvb_get_string_enc(wmem_packet_scope(), tvb, data_pos, al_filename_len, ENC_ASCII);
|
||||
proto_tree_add_text(point_tree, tvb, data_pos, al_filename_len, "File Name: %s", al_filename);
|
||||
}
|
||||
data_pos += al_filename_len;
|
||||
|
|
|
@ -637,20 +637,20 @@ dissect_dictionary(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offs
|
|||
*/
|
||||
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s:%s > %s:%s",
|
||||
tvb_get_stringz(wmem_packet_scope(), tvb, offset + dict_data->source_scheme_offset, NULL),
|
||||
tvb_get_stringz(wmem_packet_scope(), tvb, offset + dict_data->source_ssp_offset, NULL),
|
||||
tvb_get_stringz(wmem_packet_scope(), tvb, offset + dict_data->dest_scheme_offset, NULL),
|
||||
tvb_get_stringz(wmem_packet_scope(), tvb, offset + dict_data->dest_ssp_offset, NULL));
|
||||
tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset + dict_data->source_scheme_offset, NULL, ENC_ASCII),
|
||||
tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset + dict_data->source_ssp_offset, NULL, ENC_ASCII),
|
||||
tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset + dict_data->dest_scheme_offset, NULL, ENC_ASCII),
|
||||
tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset + dict_data->dest_ssp_offset, NULL, ENC_ASCII));
|
||||
|
||||
/* remember custodian, for use in checking cteb validity */
|
||||
*bundle_custodian = wmem_strdup_printf(wmem_packet_scope(),
|
||||
"%s:%s",
|
||||
tvb_get_stringz(wmem_packet_scope(),
|
||||
tvb_get_stringz_enc(wmem_packet_scope(),
|
||||
tvb, offset + dict_data->cust_scheme_offset,
|
||||
NULL),
|
||||
tvb_get_stringz(wmem_packet_scope(),
|
||||
NULL, ENC_ASCII),
|
||||
tvb_get_stringz_enc(wmem_packet_scope(),
|
||||
tvb, offset + dict_data->cust_ssp_offset,
|
||||
NULL));
|
||||
NULL, ENC_ASCII));
|
||||
}
|
||||
offset += dict_data->bundle_header_dict_length; /*Skip over dictionary*/
|
||||
|
||||
|
@ -1567,7 +1567,7 @@ display_metadata_block(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
|
|||
|
||||
/* and second is the creator custodian EID */
|
||||
cteb_creator_custodian_eid_length = block_length - sdnv_length;
|
||||
cteb_creator_custodian_eid = (char *) tvb_get_string(wmem_packet_scope(), tvb, offset, cteb_creator_custodian_eid_length);
|
||||
cteb_creator_custodian_eid = (char *) tvb_get_string_enc(wmem_packet_scope(), tvb, offset, cteb_creator_custodian_eid_length, ENC_ASCII);
|
||||
ti = proto_tree_add_string(block_tree, hf_block_control_block_cteb_creator_custodian_eid, tvb, offset,
|
||||
cteb_creator_custodian_eid_length, cteb_creator_custodian_eid);
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ dissect_text_interface_identifier_parameter(tvbuff_t *parameter_tvb, proto_tree
|
|||
proto_tree_add_item(parameter_tree, hf_text_interface_id,
|
||||
parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(parameter_item, " (%.*s)", interface_id_length,
|
||||
tvb_get_string(wmem_packet_scope(), parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
|
||||
tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length, ENC_ASCII));
|
||||
}
|
||||
|
||||
#define INFO_STRING_OFFSET PARAMETER_VALUE_OFFSET
|
||||
|
@ -126,7 +126,7 @@ dissect_info_string_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tre
|
|||
proto_tree_add_item(parameter_tree, hf_info_string,
|
||||
parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(parameter_item, " (%.*s)", info_string_length,
|
||||
tvb_get_string(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length));
|
||||
tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII));
|
||||
}
|
||||
|
||||
#define DLCI_LENGTH 2
|
||||
|
|
|
@ -3610,8 +3610,8 @@ dissect_dvbci_ami_file_ack(tvbuff_t *tvb, gint offset,
|
|||
proto_tree_add_text(tree, tvb, offset, 1,
|
||||
"File name length %d", file_name_len);
|
||||
offset++;
|
||||
file_name_str = tvb_get_string(wmem_packet_scope(),
|
||||
tvb, offset, file_name_len);
|
||||
file_name_str = tvb_get_string_enc(wmem_packet_scope(),
|
||||
tvb, offset, file_name_len, ENC_ASCII);
|
||||
if (!file_name_str)
|
||||
return;
|
||||
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ",
|
||||
|
@ -3696,7 +3696,7 @@ dissect_dvbci_payload_ami(guint32 tag, gint len_field _U_,
|
|||
offset++;
|
||||
proto_tree_add_item(tree, hf_dvbci_app_dom_id,
|
||||
tvb, offset, app_dom_id_len, ENC_ASCII|ENC_NA);
|
||||
app_dom_id = tvb_get_string(wmem_packet_scope(), tvb, offset, app_dom_id_len);
|
||||
app_dom_id = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, app_dom_id_len, ENC_ASCII);
|
||||
if (app_dom_id) {
|
||||
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ",
|
||||
"for %s", app_dom_id);
|
||||
|
@ -3726,8 +3726,8 @@ dissect_dvbci_payload_ami(guint32 tag, gint len_field _U_,
|
|||
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
||||
break;
|
||||
if (req_type==REQ_TYPE_FILE || req_type==REQ_TYPE_FILE_HASH) {
|
||||
req_str = tvb_get_string(wmem_packet_scope(), tvb, offset,
|
||||
tvb_reported_length_remaining(tvb, offset));
|
||||
req_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset,
|
||||
tvb_reported_length_remaining(tvb, offset), ENC_ASCII);
|
||||
if (!req_str)
|
||||
break;
|
||||
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "%s", req_str);
|
||||
|
|
|
@ -947,7 +947,7 @@ static int dissect_kademlia_string(tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
proto_tree_add_uint(tree, hf_edonkey_string_length, tvb, offset, 2, string_length);
|
||||
|
||||
/* TODO: ASCII or UTF-8? */
|
||||
string_value = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, string_length );
|
||||
string_value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 2, string_length , ENC_ASCII);
|
||||
|
||||
proto_tree_add_text(tree, tvb, offset+2, string_length, "String: %s", string_value);
|
||||
|
||||
|
|
|
@ -1336,8 +1336,8 @@ dissect_eigrp_service (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
|
|||
* followed by a '<'), try XML. Otherwise, try plain-text.
|
||||
*/
|
||||
xml_tvb = tvb_new_subset_length(sub_tvb, sub_offset, length);
|
||||
test_string = tvb_get_string(wmem_packet_scope(), xml_tvb, 0, (length < 32 ?
|
||||
length : 32));
|
||||
test_string = tvb_get_string_enc(wmem_packet_scope(), xml_tvb, 0, (length < 32 ?
|
||||
length : 32), ENC_ASCII);
|
||||
tok = strtok(test_string, " \t\r\n");
|
||||
|
||||
if (tok && tok[0] == '<') {
|
||||
|
|
|
@ -216,7 +216,7 @@ dissect_lower_address(proto_item *ti_arg, gint ett_arg,
|
|||
offset += 8; /* skip the zero bytes */
|
||||
|
||||
/* SUFFIX */
|
||||
suffix = tvb_get_string(wmem_packet_scope(), tvb, offset+1, len2);
|
||||
suffix = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+1, len2, ENC_ASCII);
|
||||
ti = proto_tree_add_item(tree, hf_suff, tvb, offset, 1, ENC_ASCII|ENC_LITTLE_ENDIAN);
|
||||
offset += len2+1;
|
||||
|
||||
|
@ -448,7 +448,7 @@ dissect_elcom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (tvb_get_guint8(tvb, 3+1+TOTAL_LEN+LOWADR_LEN) != SUFFIX_LEN) return;
|
||||
|
||||
/* finally believe that there is valid suffix */
|
||||
suffix = tvb_get_string(wmem_packet_scope(), tvb, 3+2+LOWADR_LEN, 2);
|
||||
suffix = tvb_get_string_enc(wmem_packet_scope(), tvb, 3+2+LOWADR_LEN, 2, ENC_ASCII);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " %s Connect", suffix);
|
||||
break;
|
||||
|
||||
|
|
|
@ -495,7 +495,7 @@ dissect_pool_handle_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tre
|
|||
handle_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH;
|
||||
pi = proto_tree_add_item(parameter_tree, hf_pool_handle, parameter_tvb, POOL_HANDLE_OFFSET, handle_length, ENC_NA);
|
||||
|
||||
tmp = (gchar*)tvb_get_string(wmem_packet_scope(), parameter_tvb, POOL_HANDLE_OFFSET, handle_length);
|
||||
tmp = (gchar*)tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, POOL_HANDLE_OFFSET, handle_length, ENC_ASCII);
|
||||
proto_item_append_text(pi, " (%s)", tmp);
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ dissect_epmd_request(packet_info *pinfo, tvbuff_t *tvb, gint offset, proto_tree
|
|||
name_length = tvb_get_ntohs(tvb, offset);
|
||||
proto_tree_add_item(tree, hf_epmd_name_len, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tree, hf_epmd_name, tvb, offset + 2, name_length, ENC_ASCII|ENC_NA);
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, name_length);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 2, name_length, ENC_ASCII);
|
||||
offset += 2 + name_length;
|
||||
if (tvb_length_remaining(tvb, offset) >= 2) {
|
||||
guint16 elen=0;
|
||||
|
@ -161,7 +161,7 @@ dissect_epmd_request(packet_info *pinfo, tvbuff_t *tvb, gint offset, proto_tree
|
|||
case EPMD_PORT2_REQ:
|
||||
name_length = tvb_length_remaining(tvb, offset);
|
||||
proto_tree_add_item(tree, hf_epmd_name, tvb, offset, name_length, ENC_ASCII|ENC_NA);
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset, name_length);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, name_length, ENC_ASCII);
|
||||
break;
|
||||
|
||||
case EPMD_ALIVE_REQ:
|
||||
|
@ -169,7 +169,7 @@ dissect_epmd_request(packet_info *pinfo, tvbuff_t *tvb, gint offset, proto_tree
|
|||
offset += 2;
|
||||
name_length = tvb_length_remaining(tvb, offset);
|
||||
proto_tree_add_item(tree, hf_epmd_name, tvb, offset, name_length, ENC_ASCII|ENC_NA);
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset, name_length);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, name_length, ENC_ASCII);
|
||||
break;
|
||||
|
||||
case EPMD_NAMES_REQ:
|
||||
|
@ -248,7 +248,7 @@ dissect_epmd_response(packet_info *pinfo, tvbuff_t *tvb, gint offset, proto_tree
|
|||
name_length = tvb_get_ntohs(tvb, offset);
|
||||
proto_tree_add_item(tree, hf_epmd_name_len, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tree, hf_epmd_name, tvb, offset + 2, name_length, ENC_ASCII|ENC_NA);
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, name_length);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 2, name_length, ENC_ASCII);
|
||||
offset += 2 + name_length;
|
||||
if (tvb_length_remaining(tvb, offset) >= 2) {
|
||||
guint16 elen=0;
|
||||
|
|
|
@ -234,7 +234,7 @@ static gint dissect_etf_dist_header(packet_info *pinfo _U_, tvbuff_t *tvb, gint
|
|||
proto_tree_add_uint(acr_tree, hf_erldp_atom_length, tvb, offset, 1, atom_txt_len);
|
||||
offset++;
|
||||
}
|
||||
str = tvb_get_string(wmem_packet_scope(), tvb, offset, atom_txt_len);
|
||||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, atom_txt_len, ENC_ASCII);
|
||||
proto_tree_add_item(acr_tree, hf_erldp_atom_text, tvb, offset, atom_txt_len, ENC_NA|ENC_ASCII);
|
||||
proto_item_append_text(ti_acr, " - '%s'", str);
|
||||
offset += atom_txt_len;
|
||||
|
@ -443,7 +443,7 @@ static void dissect_erldp_handshake(tvbuff_t *tvb, packet_info *pinfo, proto_tre
|
|||
offset += 4;
|
||||
}
|
||||
str_len = tvb_length_remaining(tvb, offset);
|
||||
str = tvb_get_string(wmem_packet_scope(), tvb, offset, str_len);
|
||||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, str_len, ENC_ASCII);
|
||||
proto_tree_add_item(tree, hf_erldp_name, tvb, offset, str_len, ENC_ASCII|ENC_NA);
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s", (is_challenge) ? "SEND_CHALLENGE" : "SEND_NAME", str);
|
||||
break;
|
||||
|
@ -464,7 +464,7 @@ static void dissect_erldp_handshake(tvbuff_t *tvb, packet_info *pinfo, proto_tre
|
|||
|
||||
case 's' :
|
||||
str_len = tvb_length_remaining(tvb, offset);
|
||||
str = tvb_get_string(wmem_packet_scope(), tvb, offset, str_len);
|
||||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, str_len, ENC_ASCII);
|
||||
proto_tree_add_item(tree, hf_erldp_status, tvb, offset, str_len, ENC_ASCII|ENC_NA);
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "SEND_STATUS %s", str);
|
||||
break;
|
||||
|
|
|
@ -1314,7 +1314,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
|||
break;
|
||||
case 0x78: /* NMEA sentence / IMS Status-Code */
|
||||
if (ims_event) {
|
||||
guint8 *status_code = tvb_get_string(wmem_packet_scope(), tvb, pos, len);
|
||||
guint8 *status_code = tvb_get_string_enc(wmem_packet_scope(), tvb, pos, len, ENC_ASCII);
|
||||
proto_tree_add_string_format_value(elem_tree, hf_ctlv_ims_status_code, tvb, pos, len,
|
||||
status_code, "%s (%s)", status_code, str_to_str(status_code, ims_status_code, "Unknown"));
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ dissect_exec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if(hash_info->state == WAIT_FOR_STDERR_PORT
|
||||
&& tvb_length_remaining(tvb, offset)){
|
||||
field_stringz = tvb_get_stringz(wmem_packet_scope(), tvb, offset, &length);
|
||||
field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII);
|
||||
|
||||
/* Check if this looks like the stderr_port field.
|
||||
* It is optional, so it may only be 1 character long
|
||||
|
@ -247,7 +247,7 @@ dissect_exec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if(hash_info->state == WAIT_FOR_USERNAME
|
||||
&& tvb_length_remaining(tvb, offset)){
|
||||
field_stringz = tvb_get_stringz(wmem_packet_scope(), tvb, offset, &length);
|
||||
field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII);
|
||||
|
||||
/* Check if this looks like the username field */
|
||||
if(length != 1 && length <= EXEC_USERNAME_LEN
|
||||
|
@ -275,7 +275,7 @@ dissect_exec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if(hash_info->state == WAIT_FOR_PASSWORD
|
||||
&& tvb_length_remaining(tvb, offset)){
|
||||
field_stringz = tvb_get_stringz(wmem_packet_scope(), tvb, offset, &length);
|
||||
field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII);
|
||||
|
||||
/* Check if this looks like the password field */
|
||||
if(length != 1 && length <= EXEC_PASSWORD_LEN
|
||||
|
@ -298,7 +298,7 @@ dissect_exec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if(hash_info->state == WAIT_FOR_COMMAND
|
||||
&& tvb_length_remaining(tvb, offset)){
|
||||
field_stringz = tvb_get_stringz(wmem_packet_scope(), tvb, offset, &length);
|
||||
field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII);
|
||||
|
||||
/* Check if this looks like the command field */
|
||||
if(length != 1 && length <= EXEC_COMMAND_LEN
|
||||
|
|
|
@ -430,7 +430,7 @@ dissect_display_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, p
|
|||
offset += 4;
|
||||
length -= 4;
|
||||
|
||||
display_name = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
|
||||
display_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
|
||||
proto_item_append_text(display_item, ": \"%s\"",
|
||||
format_text(display_name, strlen(display_name)));
|
||||
proto_tree_add_string(display_tree, hf_edp_display_string, tvb, offset, length,
|
||||
|
@ -624,7 +624,7 @@ dissect_vlan_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, prot
|
|||
offset += 4;
|
||||
length -= 4;
|
||||
|
||||
vlan_name = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
|
||||
vlan_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
|
||||
proto_item_append_text(vlan_item, ", Name \"%s\"",
|
||||
format_text(vlan_name, strlen(vlan_name)));
|
||||
proto_tree_add_string(vlan_tree, hf_edp_vlan_name, tvb, offset, length,
|
||||
|
|
|
@ -1005,9 +1005,9 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
|
|||
/* Yes - dissect it. */
|
||||
if (tree) {
|
||||
proto_tree_add_string (fc_tree, hf_fc_nh_da, tvb, next_offset, 8,
|
||||
fcwwn_to_str (tvb_get_string (wmem_packet_scope(), tvb, offset, 8)));
|
||||
fcwwn_to_str (tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 8, ENC_ASCII)));
|
||||
proto_tree_add_string (fc_tree, hf_fc_nh_sa, tvb, offset+8, 8,
|
||||
fcwwn_to_str (tvb_get_string (wmem_packet_scope(), tvb, offset+8, 8)));
|
||||
fcwwn_to_str (tvb_get_string_enc(wmem_packet_scope(), tvb, offset+8, 8, ENC_ASCII)));
|
||||
}
|
||||
next_offset += 16;
|
||||
}
|
||||
|
|
|
@ -1276,7 +1276,7 @@ static guint8 *
|
|||
zonenm_to_str (tvbuff_t *tvb, gint offset)
|
||||
{
|
||||
int len = tvb_get_guint8 (tvb, offset);
|
||||
return tvb_get_string (wmem_packet_scope(), tvb, offset+4, len);
|
||||
return tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len, ENC_ASCII);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1342,8 +1342,8 @@ dissect_fcdns_swils_entries (tvbuff_t *tvb, proto_tree *tree, int offset)
|
|||
|
||||
proto_tree_add_item (tree, &hfi_fcdns_sw2_objfmt, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_string (tree, &hfi_fcdns_rply_ownerid, tvb, offset+1,
|
||||
3, fc_to_str (tvb_get_string (wmem_packet_scope(), tvb, offset+1,
|
||||
3)));
|
||||
3, fc_to_str (tvb_get_string_enc(wmem_packet_scope(), tvb, offset+1,
|
||||
3, ENC_ASCII)));
|
||||
proto_tree_add_item (tree, &hfi_fcdns_rply_ptype, tvb, offset+4,
|
||||
1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_string (tree, &hfi_fcdns_rply_portid, tvb, offset+5, 3,
|
||||
|
|
|
@ -126,11 +126,11 @@ dissect_nv_pairs(tvbuff_t *tvb, proto_tree *fcgi_tree, gint offset, guint16 len)
|
|||
offset += 4;
|
||||
}
|
||||
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset, namelen);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, namelen, ENC_ASCII);
|
||||
offset += namelen;
|
||||
|
||||
if (valuelen > 0) {
|
||||
value = tvb_get_string(wmem_packet_scope(), tvb, offset, valuelen);
|
||||
value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, valuelen, ENC_ASCII);
|
||||
offset += valuelen;
|
||||
|
||||
proto_tree_add_text(fcgi_tree, tvb, start_offset, offset - start_offset, "%s = %s", name, value);
|
||||
|
|
|
@ -470,7 +470,7 @@ static guint8 *
|
|||
zonenm_to_str(tvbuff_t *tvb, gint offset)
|
||||
{
|
||||
int len = tvb_get_guint8(tvb, offset);
|
||||
return tvb_get_string(wmem_packet_scope(), tvb, offset+4, len);
|
||||
return tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len, ENC_ASCII);
|
||||
}
|
||||
|
||||
/* Offset points to the start of the zone object */
|
||||
|
|
|
@ -119,7 +119,7 @@ static int fix_next_header(tvbuff_t *tvb, int offset)
|
|||
{
|
||||
/* try to resync to the next start */
|
||||
guint min_len = tvb_length_remaining(tvb, offset);
|
||||
const guint8 *data = tvb_get_string(wmem_packet_scope(), tvb, offset, min_len);
|
||||
const guint8 *data = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, min_len, ENC_ASCII);
|
||||
const guint8 *start = data;
|
||||
|
||||
while ((start = strstr(start, "\0018"))) {
|
||||
|
@ -193,7 +193,7 @@ static int fix_header_len(tvbuff_t *tvb, int offset)
|
|||
return fix_next_header(tvb, offset);
|
||||
}
|
||||
|
||||
value = tvb_get_string(wmem_packet_scope(), tvb, tag->value_offset, tag->value_len);
|
||||
value = tvb_get_string_enc(wmem_packet_scope(), tvb, tag->value_offset, tag->value_len, ENC_ASCII);
|
||||
/* Fix version, msg type, length and checksum aren't in body length.
|
||||
* If the packet is big enough find the checksum
|
||||
*/
|
||||
|
@ -271,7 +271,7 @@ dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
|
|||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
value = tvb_get_string(wmem_packet_scope(), tvb, tag->value_offset, tag->value_len);
|
||||
value = tvb_get_string_enc(wmem_packet_scope(), tvb, tag->value_offset, tag->value_len, ENC_ASCII);
|
||||
msg_type = str_to_str(value, messages_val, "FIX Message (%s)");
|
||||
col_add_str(pinfo->cinfo, COL_INFO, msg_type);
|
||||
|
||||
|
@ -288,7 +288,7 @@ dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
|
|||
continue;
|
||||
}
|
||||
|
||||
tag_str = tvb_get_string(wmem_packet_scope(), tvb, field_offset, tag->tag_len);
|
||||
tag_str = tvb_get_string_enc(wmem_packet_scope(), tvb, field_offset, tag->tag_len, ENC_ASCII);
|
||||
tag_value = atoi(tag_str);
|
||||
if (tag->value_len < 1) {
|
||||
proto_tree *field_tree;
|
||||
|
@ -312,7 +312,7 @@ dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
|
|||
found = 1;
|
||||
}
|
||||
|
||||
value = tvb_get_string(wmem_packet_scope(), tvb, tag->value_offset, tag->value_len);
|
||||
value = tvb_get_string_enc(wmem_packet_scope(), tvb, tag->value_offset, tag->value_len, ENC_ASCII);
|
||||
if (found) {
|
||||
if (fix_fields[i].table) {
|
||||
if (tree) {
|
||||
|
|
|
@ -95,15 +95,15 @@ dissect_fmtp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
|
|||
|
||||
case FMTP_TYP_IDENTIFICATION:
|
||||
proto_item_append_text(ti, " (%s)",
|
||||
tvb_get_string(wmem_packet_scope(), tvb, FMTP_HEADER_LEN, packet_len-FMTP_HEADER_LEN));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, FMTP_HEADER_LEN, packet_len-FMTP_HEADER_LEN, ENC_ASCII));
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (%s)",
|
||||
val_to_str(packet_type, packet_type_names, "Unknown (0x%02x)"),
|
||||
tvb_get_string(wmem_packet_scope(), tvb, FMTP_HEADER_LEN, packet_len-FMTP_HEADER_LEN));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, FMTP_HEADER_LEN, packet_len-FMTP_HEADER_LEN, ENC_ASCII));
|
||||
break;
|
||||
|
||||
case FMTP_TYP_SYSTEM:
|
||||
proto_item_append_text(ti, " (%s)",
|
||||
tvb_get_string(wmem_packet_scope(), tvb, FMTP_HEADER_LEN, packet_len-FMTP_HEADER_LEN));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, FMTP_HEADER_LEN, packet_len-FMTP_HEADER_LEN, ENC_ASCII));
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (%s)",
|
||||
val_to_str(packet_type, packet_type_names, "Unknown (0x%02x)"),
|
||||
val_to_str(tvb_get_ntohs(tvb, FMTP_HEADER_LEN), system_message_names, "Unknown (0x%02x)"));
|
||||
|
|
|
@ -150,7 +150,7 @@ dissect_string_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, pr
|
|||
offset += 4;
|
||||
length -= 4;
|
||||
|
||||
string_value = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
|
||||
string_value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
|
||||
proto_item_append_text(string_item, ": \"%s\"",
|
||||
format_text(string_value, strlen(string_value)));
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ dissect_binary_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
|
|||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Gearman");
|
||||
col_clear(pinfo->cinfo,COL_INFO);
|
||||
|
||||
magic_code = tvb_get_string(wmem_packet_scope(), tvb, 1, 3);
|
||||
magic_code = tvb_get_string_enc(wmem_packet_scope(), tvb, 1, 3, ENC_ASCII);
|
||||
type = tvb_get_ntohl(tvb, 4);
|
||||
size = tvb_get_ntohl(tvb, 8);
|
||||
|
||||
|
@ -442,7 +442,7 @@ dissect_management_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (cmdlen == linelen && 0 == tvb_strneql(tvb, offset, GEARMAN_MGR_CMDS[i], cmdlen))
|
||||
{
|
||||
proto_tree_add_item(gearman_tree, hf_gearman_mgr_cmd, tvb, offset, cmdlen, ENC_ASCII|ENC_NA);
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "[MGR] %s", tvb_get_string(wmem_packet_scope(), tvb, offset, linelen));
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "[MGR] %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, linelen, ENC_ASCII));
|
||||
type = 1;
|
||||
break;
|
||||
}
|
||||
|
@ -454,12 +454,12 @@ dissect_management_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (type == 0)
|
||||
{
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "[MGR] %s", tvb_get_string(wmem_packet_scope(), tvb, offset, linelen));
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "[MGR] %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, linelen, ENC_ASCII));
|
||||
type = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
col_append_sep_fstr(pinfo->cinfo, COL_INFO, ",", "%s", tvb_get_string(wmem_packet_scope(), tvb, offset, linelen));
|
||||
col_append_sep_fstr(pinfo->cinfo, COL_INFO, ",", "%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, linelen, ENC_ASCII));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4025,7 +4025,7 @@ dissect_reply_body (tvbuff_t *tvb, guint offset, packet_info *pinfo,
|
|||
|
||||
if (sequence_length != 0 && sequence_length < ITEM_LABEL_LENGTH)
|
||||
{
|
||||
header->exception_id = tvb_get_stringz(wmem_packet_scope(), tvb, offset, &sequence_length);
|
||||
header->exception_id = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &sequence_length, ENC_ASCII);
|
||||
|
||||
proto_tree_add_string(tree, hf_giop_exception_id, tvb, offset,
|
||||
sequence_length, header->exception_id);
|
||||
|
|
|
@ -57,7 +57,7 @@ static gboolean get_packet_length(tvbuff_t *tvb, int offset,
|
|||
{
|
||||
guint8 *lenstr;
|
||||
|
||||
lenstr = tvb_get_string(wmem_packet_scope(), tvb, offset, 4);
|
||||
lenstr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 4, ENC_ASCII);
|
||||
|
||||
return (sscanf(lenstr, "%hx", length) == 1);
|
||||
}
|
||||
|
|
|
@ -530,7 +530,7 @@ gluster_rpc_dissect_dict(proto_tree *tree, tvbuff_t *tvb, int hfindex, int offse
|
|||
offset += 4;
|
||||
|
||||
/* read the key, '\0' terminated */
|
||||
key = tvb_get_stringz(wmem_packet_scope(), tvb, offset, &key_len);
|
||||
key = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &key_len, ENC_ASCII);
|
||||
start_offset2 = offset;
|
||||
offset += key_len;
|
||||
|
||||
|
@ -558,7 +558,7 @@ gluster_rpc_dissect_dict(proto_tree *tree, tvbuff_t *tvb, int hfindex, int offse
|
|||
tvb_get_letohl(tvb, offset + 4),
|
||||
tvb_get_letohl(tvb, offset + 8));
|
||||
} else {
|
||||
value = tvb_get_string(wmem_packet_scope(), tvb, offset, value_len);
|
||||
value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, value_len, ENC_ASCII);
|
||||
dict_item = proto_tree_add_text(subtree, tvb, offset, -1, "%s: %s",
|
||||
key, value);
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ dissect_gopher(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
|
|||
if (line_len == 0) {
|
||||
request = "[Directory list]";
|
||||
} else if (line_len > 0) {
|
||||
request = tvb_get_string(wmem_packet_scope(), tvb, 0, line_len);
|
||||
request = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, line_len, ENC_ASCII);
|
||||
}
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Request: %s", request);
|
||||
} else {
|
||||
|
@ -173,7 +173,7 @@ dissect_gopher(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
|
|||
col_append_str(pinfo->cinfo, COL_INFO, ": [Directory list]");
|
||||
}
|
||||
|
||||
name = tvb_get_string(wmem_packet_scope(), tvb, offset + 1, sel_start - offset - 2);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, sel_start - offset - 2, ENC_ASCII);
|
||||
ti = proto_tree_add_string(gopher_tree, hf_gopher_dir_item, tvb,
|
||||
offset, line_len + 1, name);
|
||||
dir_tree = proto_item_add_subtree(ti, ett_dir_item);
|
||||
|
|
|
@ -359,7 +359,7 @@ dissect_ipa(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
if (global_ipa_in_info == TRUE)
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
|
||||
tvb_get_stringz(wmem_packet_scope(), next_tvb, 0, NULL));
|
||||
tvb_get_stringz_enc(wmem_packet_scope(), next_tvb, 0, NULL, ENC_ASCII));
|
||||
break;
|
||||
default:
|
||||
if (msg_type < ABISIP_RSL_MAX) {
|
||||
|
|
|
@ -4641,7 +4641,7 @@ decode_fqdn(tvbuff_t * tvb, int offset, guint16 length, proto_tree * tree)
|
|||
name_len = tvb_get_guint8(tvb, offset);
|
||||
|
||||
if (name_len < 0x20) {
|
||||
fqdn = tvb_get_string(wmem_packet_scope(), tvb, offset + 1, length - 1);
|
||||
fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, length - 1, ENC_ASCII);
|
||||
for (;;) {
|
||||
if (name_len >= length - 1)
|
||||
break;
|
||||
|
@ -4650,7 +4650,7 @@ decode_fqdn(tvbuff_t * tvb, int offset, guint16 length, proto_tree * tree)
|
|||
fqdn[tmp] = '.';
|
||||
}
|
||||
} else
|
||||
fqdn = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
|
||||
fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
|
||||
|
||||
proto_tree_add_string(tree, hf_gtp_fqdn, tvb, offset, length, fqdn);
|
||||
}
|
||||
|
|
|
@ -1461,7 +1461,7 @@ dissect_gtpv2_apn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
|
|||
name_len = tvb_get_guint8(tvb, offset);
|
||||
|
||||
if (name_len < 0x20) {
|
||||
apn = tvb_get_string(wmem_packet_scope(), tvb, offset + 1, length - 1);
|
||||
apn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, length - 1, ENC_ASCII);
|
||||
for (;;) {
|
||||
if (name_len >= length - 1)
|
||||
break;
|
||||
|
@ -1470,7 +1470,7 @@ dissect_gtpv2_apn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
|
|||
apn[tmp] = '.';
|
||||
}
|
||||
} else{
|
||||
apn = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
|
||||
apn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
|
||||
}
|
||||
proto_tree_add_string(tree, hf_gtpv2_apn, tvb, offset, length, apn);
|
||||
}
|
||||
|
@ -4474,7 +4474,7 @@ dissect_gtpv2_fqdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, prot
|
|||
name_len = tvb_get_guint8(tvb, offset);
|
||||
|
||||
if (name_len < 0x20) {
|
||||
fqdn = tvb_get_string(wmem_packet_scope(), tvb, offset + 1, length - 1);
|
||||
fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, length - 1, ENC_ASCII);
|
||||
for (;;) {
|
||||
if (name_len >= length - 1)
|
||||
break;
|
||||
|
@ -4483,7 +4483,7 @@ dissect_gtpv2_fqdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, prot
|
|||
fqdn[tmp] = '.';
|
||||
}
|
||||
} else {
|
||||
fqdn = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
|
||||
fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
|
||||
}
|
||||
proto_tree_add_string(tree, hf_gtpv2_fqdn, tvb, offset, length, fqdn);
|
||||
proto_item_append_text(item, "%s", fqdn);
|
||||
|
|
|
@ -1031,11 +1031,11 @@ dissect_hip_tlv(tvbuff_t *tvb, int offset, proto_item *ti, int type, int tlv_len
|
|||
if (di_type == 1) {
|
||||
/* RFC 1035 */
|
||||
proto_tree_add_text(t, tvb, offset+16+hi_len, di_len,
|
||||
"FQDN: %s", tvb_get_string (wmem_packet_scope(), tvb, offset+16+hi_len, di_len));
|
||||
"FQDN: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset+16+hi_len, di_len, ENC_ASCII));
|
||||
} else if (di_type == 2) {
|
||||
/* RFC 4282 */
|
||||
proto_tree_add_text(t, tvb, offset+16+hi_len, di_len,
|
||||
"NAI: %s", tvb_get_string (wmem_packet_scope(), tvb, offset+16+hi_len, di_len));
|
||||
"NAI: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset+16+hi_len, di_len, ENC_ASCII));
|
||||
}
|
||||
break;
|
||||
case PARAM_CERT: /* CERT */
|
||||
|
|
|
@ -133,7 +133,7 @@ dissect_hpfeeds_info_pdu(tvbuff_t *tvb, proto_tree *tree, guint offset)
|
|||
|
||||
len = tvb_get_guint8(tvb, offset);
|
||||
/* don't move the offset yet as we need to get data after this operation */
|
||||
strptr = tvb_get_string(wmem_packet_scope(), tvb, offset + 1, len);
|
||||
strptr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, len, ENC_ASCII);
|
||||
ti = proto_tree_add_text(tree, tvb, offset, -1, "Broker: %s", strptr);
|
||||
data_subtree = proto_item_add_subtree(ti, ett_hpfeeds);
|
||||
|
||||
|
@ -190,7 +190,7 @@ dissect_hpfeeds_publish_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
/* get the channel name as ephemeral string just to make an attempt
|
||||
* in order to decode more payload if channel is "well known"
|
||||
*/
|
||||
strptr = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
|
||||
strptr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
|
||||
proto_tree_add_item(tree, hf_hpfeeds_channel, tvb, offset, len,
|
||||
ENC_ASCII|ENC_NA);
|
||||
offset += len;
|
||||
|
|
|
@ -1539,7 +1539,7 @@ basic_request_dissector(tvbuff_t *tvb, proto_tree *tree, int offset,
|
|||
tokenlen = get_token_len(line, lineend, &next_token);
|
||||
|
||||
/* Save the request URI for various later uses */
|
||||
request_uri = tvb_get_string(wmem_packet_scope(), tvb, offset, tokenlen);
|
||||
request_uri = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tokenlen, ENC_ASCII);
|
||||
stat_info->request_uri = wmem_strdup(wmem_packet_scope(), request_uri);
|
||||
conv_data->request_uri = wmem_strdup(wmem_file_scope(), request_uri);
|
||||
|
||||
|
@ -1659,7 +1659,7 @@ chunked_encoding_dissector(tvbuff_t **tvb_ptr, packet_info *pinfo,
|
|||
break;
|
||||
}
|
||||
|
||||
chunk_string = tvb_get_string(wmem_packet_scope(), tvb, offset, linelen);
|
||||
chunk_string = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, linelen, ENC_ASCII);
|
||||
|
||||
if (chunk_string == NULL) {
|
||||
/* Can't get the chunk size line */
|
||||
|
@ -1851,7 +1851,7 @@ chunked_encoding_dissector(tvbuff_t **tvb_ptr, packet_info *pinfo,
|
|||
break;
|
||||
}
|
||||
|
||||
chunk_string = tvb_get_string(wmem_packet_scope(), tvb, offset, linelen);
|
||||
chunk_string = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, linelen, ENC_ASCII);
|
||||
|
||||
if (chunk_string == NULL) {
|
||||
/* Can't get the chunk size line */
|
||||
|
|
|
@ -1477,7 +1477,7 @@ static guint32 dissect_ies(tvbuff_t *tvb, packet_info *pinfo, guint32 offset,
|
|||
break;
|
||||
|
||||
default:
|
||||
ptr = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, ies_len);
|
||||
ptr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 2, ies_len, ENC_ASCII);
|
||||
ie_item =
|
||||
proto_tree_add_string_format(ies_tree, hf_IAX_IE_UNKNOWN_BYTES,
|
||||
tvb, offset+2, ies_len, ptr,
|
||||
|
|
|
@ -242,7 +242,7 @@ static void dissect_ice_string(packet_info *pinfo, proto_tree *tree, proto_item
|
|||
|
||||
|
||||
if ( Size != 0 ) {
|
||||
s = tvb_get_string(wmem_packet_scope(), tvb, offset, Size);
|
||||
s = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, Size, ENC_ASCII);
|
||||
proto_tree_add_string(tree, hf_icep, tvb, offset, Size, s);
|
||||
} else {
|
||||
s = wmem_strdup(wmem_packet_scope(), "(empty)");
|
||||
|
|
|
@ -98,7 +98,7 @@ static void dissect_icp_payload(tvbuff_t *tvb, int offset,
|
|||
/* null terminated URL */
|
||||
stringlength = tvb_strsize(tvb, offset);
|
||||
proto_tree_add_text(pload_tree, tvb, offset, stringlength,
|
||||
"URL: %s", tvb_get_string(wmem_packet_scope(), tvb, offset, stringlength));
|
||||
"URL: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, stringlength, ENC_ASCII));
|
||||
break;
|
||||
|
||||
case CODE_ICP_OP_SECHO:
|
||||
|
@ -110,14 +110,14 @@ static void dissect_icp_payload(tvbuff_t *tvb, int offset,
|
|||
case CODE_ICP_OP_DENIED:
|
||||
stringlength = tvb_strsize(tvb, offset);
|
||||
proto_tree_add_text(pload_tree, tvb, offset, stringlength,
|
||||
"URL: %s", tvb_get_string(wmem_packet_scope(), tvb, offset, stringlength));
|
||||
"URL: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, stringlength, ENC_ASCII));
|
||||
break;
|
||||
|
||||
case CODE_ICP_OP_HIT_OBJ:
|
||||
/* null terminated URL */
|
||||
stringlength = tvb_strsize(tvb, offset);
|
||||
proto_tree_add_text(pload_tree, tvb, offset, stringlength,
|
||||
"URL: %s", tvb_get_string(wmem_packet_scope(), tvb, offset, stringlength));
|
||||
"URL: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, stringlength, ENC_ASCII));
|
||||
offset += stringlength;
|
||||
|
||||
/* 2 byte object size */
|
||||
|
|
|
@ -446,7 +446,7 @@ proto_add_icq_attr(proto_tree* tree, /* The tree to add to */
|
|||
return -1; /* length goes past end of packet */
|
||||
proto_tree_add_text(tree, tvb, offset, len+2,
|
||||
"%s[%u]: %.*s", descr, len, len,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset + 2, len));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 2, len, ENC_ASCII));
|
||||
return len + 2;
|
||||
}
|
||||
|
||||
|
@ -520,7 +520,7 @@ icqv5_decode_msgType(proto_tree* tree, tvbuff_t *tvb, int offset, int size,
|
|||
break;
|
||||
case MSG_TEXT:
|
||||
proto_tree_add_text(subtree, tvb, offset, left, "Msg: %.*s", left-1,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, left));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, left, ENC_ASCII));
|
||||
break;
|
||||
case MSG_URL:
|
||||
for (n = 0; n < N_URL_FIELDS; n++) {
|
||||
|
@ -534,7 +534,7 @@ icqv5_decode_msgType(proto_tree* tree, tvbuff_t *tvb, int offset, int size,
|
|||
proto_tree_add_text(subtree, tvb, offset, sz, "%s: %.*s",
|
||||
url_field_descr[n],
|
||||
sz - 1,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, sz));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, sz, ENC_ASCII));
|
||||
} else {
|
||||
proto_tree_add_text(subtree, tvb, offset, 0,
|
||||
"%s: %s", url_field_descr[n], "(empty)");
|
||||
|
@ -555,7 +555,7 @@ icqv5_decode_msgType(proto_tree* tree, tvbuff_t *tvb, int offset, int size,
|
|||
proto_tree_add_text(subtree, tvb, offset, sz, "%s: %.*s",
|
||||
email_field_descr[n],
|
||||
sz - 1,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, sz));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, sz, ENC_ASCII));
|
||||
} else {
|
||||
proto_tree_add_text(subtree, tvb, offset, 0, "%s: %s",
|
||||
email_field_descr[n], "(empty)");
|
||||
|
@ -590,7 +590,7 @@ icqv5_decode_msgType(proto_tree* tree, tvbuff_t *tvb, int offset, int size,
|
|||
if (sz != 0) {
|
||||
proto_tree_add_text(subtree, tvb, offset, sz, "%s: %.*s",
|
||||
auth_req_field_descr[n], sz - 1,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, sz));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, sz, ENC_ASCII));
|
||||
} else {
|
||||
proto_tree_add_text(subtree, tvb, offset, 0, "%s: %s",
|
||||
auth_req_field_descr[n], "(empty)");
|
||||
|
@ -610,7 +610,7 @@ icqv5_decode_msgType(proto_tree* tree, tvbuff_t *tvb, int offset, int size,
|
|||
if (sz != 0) {
|
||||
proto_tree_add_text(subtree, tvb, offset, sz, "%s: %.*s",
|
||||
user_added_field_descr[n], sz - 1,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, sz));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, sz, ENC_ASCII));
|
||||
} else {
|
||||
proto_tree_add_text(subtree, tvb, offset, 0, "%s: %s",
|
||||
user_added_field_descr[n], "(empty)");
|
||||
|
@ -640,7 +640,7 @@ icqv5_decode_msgType(proto_tree* tree, tvbuff_t *tvb, int offset, int size,
|
|||
/* The first element is the number of Nick/UIN pairs follow */
|
||||
proto_tree_add_text(subtree, tvb, offset, sz_local,
|
||||
"Number of pairs: %.*s", sz_local - 1,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, sz_local));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, sz_local, ENC_ASCII));
|
||||
n_local++;
|
||||
} else if (!last) {
|
||||
int svsz = sz_local;
|
||||
|
@ -656,8 +656,8 @@ icqv5_decode_msgType(proto_tree* tree, tvbuff_t *tvb, int offset, int size,
|
|||
}
|
||||
proto_tree_add_text(subtree, tvb, offset, sz_local + svsz,
|
||||
"%.*s: %.*s", svsz - 1,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, svsz), sz_local - 1,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, sep_offset_prev + 1, sz_local));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, svsz, ENC_ASCII), sz_local - 1,
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, sep_offset_prev + 1, sz_local, ENC_ASCII));
|
||||
n_local += 2;
|
||||
}
|
||||
|
||||
|
@ -690,8 +690,8 @@ icqv5_cmd_send_text_code(proto_tree* tree, /* Tree to put the data in */
|
|||
if (len>0) {
|
||||
proto_tree_add_text(subtree, tvb, offset + CMD_SEND_TEXT_CODE_TEXT,
|
||||
len, "Text: %.*s", len,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset + CMD_SEND_TEXT_CODE_TEXT,
|
||||
len));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset + CMD_SEND_TEXT_CODE_TEXT,
|
||||
len, ENC_ASCII));
|
||||
}
|
||||
|
||||
x1 = tvb_get_letohs(tvb, offset + CMD_SEND_TEXT_CODE_TEXT + len);
|
||||
|
@ -733,8 +733,8 @@ icqv5_cmd_login(proto_tree* tree, tvbuff_t *tvb, int offset)
|
|||
passwdLen = tvb_get_letohs(tvb, offset + CMD_LOGIN_PASSLEN);
|
||||
proto_tree_add_text(subtree, tvb, offset + CMD_LOGIN_PASSLEN,
|
||||
2 + passwdLen, "Passwd: %.*s", (int)passwdLen,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset + CMD_LOGIN_PASSWD,
|
||||
passwdLen));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset + CMD_LOGIN_PASSWD,
|
||||
passwdLen, ENC_ASCII));
|
||||
proto_tree_add_text(subtree, tvb,
|
||||
offset + CMD_LOGIN_PASSWD + passwdLen + CMD_LOGIN_IP,
|
||||
4, "IP: %s", tvb_ip_to_str(tvb, offset + CMD_LOGIN_PASSWD + passwdLen + CMD_LOGIN_IP));
|
||||
|
@ -918,7 +918,7 @@ icqv5_srv_meta_user(proto_tree* tree, /* Tree to put the data in */
|
|||
offset+=2;
|
||||
proto_tree_add_text(sstree, tvb, offset - 2,
|
||||
len+2, "About(%d): %.*s", len,
|
||||
len, tvb_get_string(wmem_packet_scope(), tvb, offset, len));
|
||||
len, tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII));
|
||||
break;
|
||||
}
|
||||
case META_USER_INFO:
|
||||
|
|
|
@ -354,7 +354,7 @@ dissect_prism(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if(tree) {
|
||||
proto_tree_add_item(prism_tree, hf_ieee80211_prism_devname, tvb, offset, 16, ENC_ASCII|ENC_NA);
|
||||
}
|
||||
devname_p = tvb_get_string(wmem_packet_scope(), tvb, offset, 16);
|
||||
devname_p = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 16, ENC_ASCII);
|
||||
offset += 16;
|
||||
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Device: %s, Message 0x%x, Length %d", devname_p, msgcode, msglen);
|
||||
|
|
|
@ -6197,7 +6197,7 @@ dissect_nai_realm_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
|
|||
}
|
||||
proto_tree_add_item(realm_tree, hf_ieee80211_ff_anqp_nai_realm,
|
||||
tvb, offset, nai_len, ENC_ASCII|ENC_NA);
|
||||
realm = tvb_get_string(wmem_packet_scope(), tvb, offset, nai_len);
|
||||
realm = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, nai_len, ENC_ASCII);
|
||||
if (realm) {
|
||||
proto_item_append_text(r_item, " (%s)", realm);
|
||||
}
|
||||
|
@ -10159,7 +10159,7 @@ dissect_vendor_ie_aruba(proto_item *item, proto_tree *ietree,
|
|||
|
||||
proto_tree_add_item (ietree, hf_ieee80211_vs_aruba_apname, tvb,
|
||||
offset, tag_len, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(item, " (%s)", tvb_get_string(wmem_packet_scope(), tvb, offset, tag_len));
|
||||
proto_item_append_text(item, " (%s)", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tag_len, ENC_ASCII));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -10965,7 +10965,7 @@ dissect_ssid_list(proto_tree *tree, tvbuff_t *tvb, int offset, guint32 tag_len)
|
|||
if (offset + 2 + len > end)
|
||||
break;
|
||||
|
||||
str = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, len);
|
||||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 2, len, ENC_ASCII);
|
||||
proto_item_append_text(tree, "%c %s", (first ? ':' : ','), str);
|
||||
first = FALSE;
|
||||
ssid = proto_tree_add_text(tree, tvb, offset, 2 + len, "SSID: %s", str);
|
||||
|
@ -12758,7 +12758,7 @@ ieee80211_tag_ssid(packet_info *pinfo, proto_tree *tree,
|
|||
ssid_len = MAX_SSID_LEN;
|
||||
}
|
||||
|
||||
ssid = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, ssid_len);
|
||||
ssid = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 2, ssid_len, ENC_ASCII);
|
||||
if (ssid_len == (gint)tag_len) {
|
||||
AirPDcapSetLastSSID(&airpdcap_ctx, (CHAR *) ssid, ssid_len);
|
||||
}
|
||||
|
@ -13125,7 +13125,7 @@ ieee80211_tag_country_info(packet_info *pinfo, proto_tree *tree,
|
|||
proto_tree_add_item(tree, hf_ieee80211_tag_country_info_code,
|
||||
tvb, offset, 2, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(ti, ": Country Code %s",
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, 2));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 2, ENC_ASCII));
|
||||
offset += 2;
|
||||
|
||||
proto_tree_add_item(tree, hf_ieee80211_tag_country_info_env,
|
||||
|
@ -14631,8 +14631,8 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
|
|||
|
||||
proto_tree_add_item(tree, hf_ieee80211_mesh_id, tvb, offset, tag_len, ENC_ASCII|ENC_NA);
|
||||
if (tag_len > 0) {
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", MESHID=%s", tvb_get_string(wmem_packet_scope(), tvb, offset, tag_len));
|
||||
proto_item_append_text(ti, ": %s", tvb_get_string(wmem_packet_scope(), tvb, offset, tag_len));
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", MESHID=%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tag_len, ENC_ASCII));
|
||||
proto_item_append_text(ti, ": %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tag_len, ENC_ASCII));
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -540,7 +540,7 @@ dissect_imf_siolabel(tvbuff_t *tvb, int offset, int length, proto_item *item, pa
|
|||
}
|
||||
|
||||
if (tvb_strneql(tvb, item_offset, "marking", 7) == 0) {
|
||||
proto_item_append_text(item, ": %s", tvb_get_string(wmem_packet_scope(), tvb, value_offset, value_length));
|
||||
proto_item_append_text(item, ": %s", tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset, value_length, ENC_ASCII));
|
||||
proto_tree_add_item(tree, hf_imf_siolabel_marking, tvb, value_offset, value_length, ENC_ASCII|ENC_NA);
|
||||
|
||||
} else if (tvb_strneql(tvb, item_offset, "fgcolor", 7) == 0) {
|
||||
|
@ -550,15 +550,15 @@ dissect_imf_siolabel(tvbuff_t *tvb, int offset, int length, proto_item *item, pa
|
|||
proto_tree_add_item(tree, hf_imf_siolabel_bgcolor, tvb, value_offset, value_length, ENC_ASCII|ENC_NA);
|
||||
|
||||
} else if (tvb_strneql(tvb, item_offset, "type", 4) == 0) {
|
||||
type = tvb_get_string(wmem_packet_scope(), tvb, value_offset + 1, value_length - 2); /* quoted */
|
||||
type = tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset + 1, value_length - 2, ENC_ASCII); /* quoted */
|
||||
proto_tree_add_item(tree, hf_imf_siolabel_type, tvb, value_offset, value_length, ENC_ASCII|ENC_NA);
|
||||
|
||||
} else if (tvb_strneql(tvb, item_offset, "label", 5) == 0) {
|
||||
gchar *label = tvb_get_string(wmem_packet_scope(), tvb, value_offset + 1, value_length - 2); /* quoted */
|
||||
gchar *label = tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset + 1, value_length - 2, ENC_ASCII); /* quoted */
|
||||
wmem_strbuf_append(label_string, label);
|
||||
|
||||
if (tvb_get_guint8(tvb, item_offset + 5) == '*') { /* continuations */
|
||||
int num = (int)strtol(tvb_get_string(wmem_packet_scope(), tvb, item_offset + 6, value_offset - item_offset + 6), NULL, 10);
|
||||
int num = (int)strtol(tvb_get_string_enc(wmem_packet_scope(), tvb, item_offset + 6, value_offset - item_offset + 6, ENC_ASCII), NULL, 10);
|
||||
proto_tree_add_string_format(tree, hf_imf_siolabel_label, tvb, value_offset, value_length,
|
||||
label, "Label[%d]: \"%s\"", num, label);
|
||||
} else {
|
||||
|
@ -616,7 +616,7 @@ dissect_imf_content_type(tvbuff_t *tvb, int offset, int length, proto_item *item
|
|||
proto_tree_add_item(ct_tree, hf_imf_content_type_type, tvb, offset, len, ENC_ASCII|ENC_NA);
|
||||
if(type) {
|
||||
/* This string will be automatically freed */
|
||||
(*type) = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
|
||||
(*type) = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
|
||||
}
|
||||
end_offset = imf_find_field_end (tvb, first_colon + 1, offset + length, NULL);
|
||||
if (end_offset == -1) {
|
||||
|
@ -627,7 +627,7 @@ dissect_imf_content_type(tvbuff_t *tvb, int offset, int length, proto_item *item
|
|||
proto_tree_add_item(ct_tree, hf_imf_content_type_parameters, tvb, first_colon + 1, len, ENC_ASCII|ENC_NA);
|
||||
if(parameters) {
|
||||
/* This string will be automatically freed */
|
||||
(*parameters) = tvb_get_string(wmem_packet_scope(), tvb, first_colon + 1, len);
|
||||
(*parameters) = tvb_get_string_enc(wmem_packet_scope(), tvb, first_colon + 1, len, ENC_ASCII);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -719,7 +719,7 @@ dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* XXX: flag an error */
|
||||
break;
|
||||
} else {
|
||||
key = tvb_get_string(wmem_packet_scope(), tvb, start_offset, end_offset - start_offset);
|
||||
key = tvb_get_string_enc(wmem_packet_scope(), tvb, start_offset, end_offset - start_offset, ENC_ASCII);
|
||||
|
||||
/* convert to lower case */
|
||||
ascii_strdown_inplace (key);
|
||||
|
|
|
@ -675,7 +675,7 @@ add_value_head(const gchar *tag_desc, proto_tree *tree, tvbuff_t *tvb,
|
|||
offset += 2;
|
||||
if (name_length != 0) {
|
||||
guint8 *nv;
|
||||
nv = tvb_get_string(wmem_packet_scope(), tvb, offset, name_length);
|
||||
nv = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, name_length, ENC_ASCII);
|
||||
proto_tree_add_text(tree, tvb, offset, name_length,
|
||||
"Name: %s", format_text(nv, name_length));
|
||||
if (name_val) {
|
||||
|
|
|
@ -3727,11 +3727,11 @@ dissect_id(tvbuff_t *tvb, int offset, int length, proto_tree *tree, int isakmp_v
|
|||
break;
|
||||
case IKE_ID_FQDN:
|
||||
proto_tree_add_item(idtree, hf_isakmp_id_data_fqdn, tvb, offset, length, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(idit, "%s", tvb_get_string(wmem_packet_scope(), tvb, offset,length));
|
||||
proto_item_append_text(idit, "%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,length, ENC_ASCII));
|
||||
break;
|
||||
case IKE_ID_USER_FQDN:
|
||||
proto_tree_add_item(idtree, hf_isakmp_id_data_user_fqdn, tvb, offset, length, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(idit, "%s", tvb_get_string(wmem_packet_scope(), tvb, offset,length));
|
||||
proto_item_append_text(idit, "%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,length, ENC_ASCII));
|
||||
break;
|
||||
case IKE_ID_IPV4_ADDR_SUBNET:
|
||||
proto_tree_add_item(idtree, hf_isakmp_id_data_ipv4_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
|
@ -4270,7 +4270,7 @@ dissect_config_attribute(tvbuff_t *tvb, proto_tree *cfg_attr_type_tree, int offs
|
|||
break;
|
||||
case APPLICATION_VERSION: /* 7 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_application_version, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
case INTERNAL_IP6_ADDRESS: /* 8 */
|
||||
offset_end = offset + optlen;
|
||||
|
@ -4395,27 +4395,27 @@ dissect_config_attribute(tvbuff_t *tvb, proto_tree *cfg_attr_type_tree, int offs
|
|||
break;
|
||||
case XAUTH_USER_NAME: /* 16521 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_xauth_user_name, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
case XAUTH_USER_PASSWORD: /* 16522 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_xauth_user_password, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
case XAUTH_PASSCODE: /* 16523 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_xauth_passcode, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
case XAUTH_MESSAGE: /* 16524 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_xauth_message, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
case XAUTH_CHALLENGE: /* 16525 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_xauth_challenge, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
case XAUTH_DOMAIN: /* 16526 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_xauth_domain, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
case XAUTH_STATUS: /* 16527 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_xauth_status, tvb, offset, optlen, ENC_BIG_ENDIAN);
|
||||
|
@ -4423,20 +4423,20 @@ dissect_config_attribute(tvbuff_t *tvb, proto_tree *cfg_attr_type_tree, int offs
|
|||
break;
|
||||
case XAUTH_NEXT_PIN: /* 16528 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_xauth_next_pin, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
case XAUTH_ANSWER: /* 16527 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_xauth_answer, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
|
||||
case UNITY_BANNER: /* 28672 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_unity_banner, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
case UNITY_DEF_DOMAIN: /* 28674 */
|
||||
proto_tree_add_item(sub_cfg_attr_type_tree, hf_isakmp_cfg_attr_unity_def_domain, tvb, offset, optlen, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string(wmem_packet_scope(), tvb, offset,optlen));
|
||||
proto_item_append_text(cfg_attr_type_item," : %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset,optlen, ENC_ASCII));
|
||||
break;
|
||||
/* TODO: Support other UNITY Attributes ! */
|
||||
default:
|
||||
|
|
|
@ -611,7 +611,7 @@ addTextKeys(packet_info *pinfo, proto_tree *tt, tvbuff_t *tvb, gint offset, guin
|
|||
len = len + 1;
|
||||
}
|
||||
|
||||
key = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
|
||||
key = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
|
||||
if (key == NULL) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ isis_dissect_ip_authentication_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
|
|||
if ( length != 0 ) {
|
||||
proto_tree_add_text ( tree, tvb, offset, length,
|
||||
"IP Authentication: %.*s", length,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset, length) );
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ isis_dissect_hostname_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
|
|||
proto_tree_add_text ( tree, tvb, offset, length,
|
||||
"Hostname: --none--" );
|
||||
} else {
|
||||
const char* value = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
|
||||
const char* value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
|
||||
proto_tree_add_string_format ( tree, tree_id,
|
||||
tvb, offset, length,
|
||||
value, "Hostname: %.*s", length, value);
|
||||
|
|
|
@ -444,7 +444,7 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
|
|||
proto_tree_add_text(edp_tuples_leaf_tree, tvb, offset, tuple_length,
|
||||
"Interface IPX_address = %s",
|
||||
ipx_addr_to_str(tvb_get_ntohl(tvb, offset),
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset+4, tuple_length-4)));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, tuple_length-4, ENC_ASCII)));
|
||||
break;
|
||||
case EDP_TUPLE_UNKNOWN:
|
||||
default:
|
||||
|
|
|
@ -6958,7 +6958,7 @@ dissect_isup_generic_name_parameter(tvbuff_t *parameter_tvb, proto_tree *paramet
|
|||
proto_tree_add_uint(parameter_tree, hf_isup_generic_name_presentation, parameter_tvb, 1, 1, indicator);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_generic_name_availability, parameter_tvb, 1, 1, indicator);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_generic_name_type, parameter_tvb, 1, 1, indicator);
|
||||
gen_name = tvb_get_string(wmem_packet_scope(), parameter_tvb, 1, gen_name_length);
|
||||
gen_name = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 1, gen_name_length, ENC_ASCII);
|
||||
gen_name[gen_name_length] = '\0';
|
||||
proto_tree_add_string(parameter_tree, hf_isup_generic_name_ia5, parameter_tvb, 2, gen_name_length, gen_name);
|
||||
proto_item_set_text(parameter_item, "Generic name: %s", gen_name);
|
||||
|
|
|
@ -139,7 +139,7 @@ dissect_text_interface_identifier_parameter(tvbuff_t *parameter_tvb, proto_tree
|
|||
|
||||
proto_tree_add_item(parameter_tree, hf_text_interface_id, parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(parameter_item, " (%.*s)", interface_id_length,
|
||||
tvb_get_string(wmem_packet_scope(), parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
|
||||
tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length, ENC_ASCII));
|
||||
}
|
||||
|
||||
#define INFO_STRING_OFFSET PARAMETER_VALUE_OFFSET
|
||||
|
@ -152,7 +152,7 @@ dissect_info_string_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tre
|
|||
info_string_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH;
|
||||
proto_tree_add_item(parameter_tree, hf_info_string, parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(parameter_item, " (%.*s)", info_string_length,
|
||||
tvb_get_string(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length));
|
||||
tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII));
|
||||
}
|
||||
|
||||
#define DLCI_SAPI_LENGTH 1
|
||||
|
|
|
@ -221,7 +221,7 @@ static void after_member(void *tvbparse_data, const void *wanted_data _U_, tvbpa
|
|||
tvbparse_elem_t *key_tok = tok->sub;
|
||||
|
||||
if (key_tok && key_tok->id == JSON_TOKEN_STRING) {
|
||||
char *key = tvb_get_string(wmem_packet_scope(), key_tok->tvb, key_tok->offset, key_tok->len);
|
||||
char *key = tvb_get_string_enc(wmem_packet_scope(), key_tok->tvb, key_tok->offset, key_tok->len, ENC_ASCII);
|
||||
|
||||
proto_item_append_text(tree, " Key: %s", key);
|
||||
}
|
||||
|
|
|
@ -791,7 +791,7 @@ static int dissect_jxta_welcome(tvbuff_t * tvb, packet_info * pinfo, proto_tree
|
|||
col_set_str(pinfo->cinfo, COL_INFO, "Welcome");
|
||||
|
||||
{
|
||||
gchar *welcomeline = tvb_get_string(wmem_packet_scope(), tvb, offset, first_linelen);
|
||||
gchar *welcomeline = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, first_linelen, ENC_ASCII);
|
||||
gchar **current_token;
|
||||
guint token_offset = offset;
|
||||
proto_item *jxta_welcome_tree_item = NULL;
|
||||
|
@ -1022,7 +1022,7 @@ static int dissect_jxta_message_framing(tvbuff_t * tvb, packet_info * pinfo, pro
|
|||
|
||||
if (content_type && (sizeof("content-type") - 1) == headername_len) {
|
||||
if (0 == tvb_strncaseeql(tvb, headername_offset, "content-type", sizeof("content-type") - 1)) {
|
||||
*content_type = tvb_get_string(wmem_packet_scope(), tvb, headervalue_offset, headervalue_len);
|
||||
*content_type = tvb_get_string_enc(wmem_packet_scope(), tvb, headervalue_offset, headervalue_len, ENC_ASCII);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1385,7 +1385,7 @@ static int dissect_jxta_message(tvbuff_t * tvb, packet_info * pinfo, proto_tree
|
|||
for (each_name = 0; each_name < msg_names_count; each_name++) {
|
||||
guint16 name_len = tvb_get_ntohs(tvb, tree_offset);
|
||||
|
||||
names_table[2 + each_name] = tvb_get_string(wmem_packet_scope(), tvb, tree_offset + (int)sizeof(name_len), name_len);
|
||||
names_table[2 + each_name] = tvb_get_string_enc(wmem_packet_scope(), tvb, tree_offset + (int)sizeof(name_len), name_len, ENC_ASCII);
|
||||
proto_tree_add_item(jxta_msg_tree, hf_jxta_message_names_name, tvb, tree_offset, (int)sizeof(name_len), ENC_ASCII|ENC_NA);
|
||||
tree_offset += (int)sizeof(name_len) + name_len;
|
||||
}
|
||||
|
@ -1636,7 +1636,7 @@ static int dissect_jxta_message_element_1(tvbuff_t * tvb, packet_info * pinfo, p
|
|||
proto_tree_add_item(jxta_elem_tree, hf_jxta_element_type, tvb, tree_offset, (int)sizeof(guint16), ENC_ASCII|ENC_NA);
|
||||
tree_offset += (int)sizeof(guint16);
|
||||
|
||||
mediatype = tvb_get_string(wmem_packet_scope(), tvb, tree_offset, type_len);
|
||||
mediatype = tvb_get_string_enc(wmem_packet_scope(), tvb, tree_offset, type_len, ENC_ASCII);
|
||||
|
||||
tree_offset += type_len;
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * da
|
|||
tokenlen = get_token_len(line, line + linelen, &next_token);
|
||||
if (tokenlen != 0) {
|
||||
guint8 *reqresp;
|
||||
reqresp = tvb_get_string(wmem_packet_scope(), tvb, offset, tokenlen);
|
||||
reqresp = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tokenlen, ENC_ASCII);
|
||||
if (is_request) {
|
||||
/*
|
||||
* No request dissection
|
||||
|
|
|
@ -291,7 +291,7 @@ static void dissect_getnamebyaddr_response(tvbuff_t* tvb, proto_tree* lwres_tree
|
|||
for(i=0; i<naliases; i++)
|
||||
{
|
||||
aliaslen = tvb_get_ntohs(tvb, offset);
|
||||
aliasname = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, aliaslen);
|
||||
aliasname = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 2, aliaslen, ENC_ASCII);
|
||||
|
||||
alias_item = proto_tree_add_text(nba_resp_tree, tvb, offset, 2 + aliaslen, "Alias %s",aliasname);
|
||||
alias_tree = proto_item_add_subtree(alias_item, ett_adn_alias);
|
||||
|
@ -417,7 +417,7 @@ static void dissect_getaddrsbyname_response(tvbuff_t* tvb, proto_tree* lwres_tre
|
|||
for(i=0; i<naliases; i++)
|
||||
{
|
||||
aliaslen = tvb_get_ntohs(tvb, offset);
|
||||
aliasname = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, aliaslen);
|
||||
aliasname = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 2, aliaslen, ENC_ASCII);
|
||||
|
||||
alias_item = proto_tree_add_text(adn_resp_tree, tvb, offset, 2 + aliaslen, "Alias %s",aliasname);
|
||||
alias_tree = proto_item_add_subtree(alias_item, ett_adn_alias);
|
||||
|
|
|
@ -335,7 +335,7 @@ dissect_m2tp_info_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree,
|
|||
if (parameter_tree) {
|
||||
length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET);
|
||||
info_string_length = length - PARAMETER_HEADER_LENGTH;
|
||||
info_string = tvb_get_string(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length);
|
||||
info_string = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII);
|
||||
proto_tree_add_string(parameter_tree, hf_m2tp_info_string, parameter_tvb, INFO_STRING_OFFSET, info_string_length, info_string);
|
||||
proto_item_set_text(parameter_item, "Info String (%.*s)", info_string_length, info_string);
|
||||
}
|
||||
|
|
|
@ -286,7 +286,7 @@ dissect_interface_identifier_text_parameter(tvbuff_t *parameter_tvb, proto_tree
|
|||
|
||||
proto_tree_add_item(parameter_tree, hf_interface_id_text, parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(parameter_item, " (%.*s)", interface_id_length,
|
||||
tvb_get_string(wmem_packet_scope(), parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
|
||||
tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length, ENC_ASCII));
|
||||
}
|
||||
|
||||
#define INFO_STRING_OFFSET PARAMETER_VALUE_OFFSET
|
||||
|
@ -299,7 +299,7 @@ dissect_info_string_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tre
|
|||
info_string_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH;
|
||||
proto_tree_add_item(parameter_tree, hf_info_string, parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(parameter_item, " (%.*s)", info_string_length,
|
||||
tvb_get_string(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length));
|
||||
tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII));
|
||||
}
|
||||
|
||||
#define DIAGNOSTIC_INFO_OFFSET PARAMETER_VALUE_OFFSET
|
||||
|
|
|
@ -410,7 +410,7 @@ dissect_info_string_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tre
|
|||
info_string_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH;
|
||||
proto_tree_add_item(parameter_tree, hf_info_string, parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(parameter_item, " (%.*s)", info_string_length,
|
||||
tvb_get_string(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length));
|
||||
tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII));
|
||||
}
|
||||
|
||||
#define AFFECTED_MASK_LENGTH 1
|
||||
|
|
|
@ -648,7 +648,7 @@ get_payload_length (tvbuff_t *tvb, const int token_number, int offset,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
bytes_val = tvb_get_string (wmem_packet_scope(), tvb, offset, tokenlen);
|
||||
bytes_val = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tokenlen, ENC_ASCII);
|
||||
if (bytes_val) {
|
||||
if (sscanf (bytes_val, "%u", bytes) == 1) {
|
||||
*content_length_found = TRUE;
|
||||
|
|
|
@ -1343,7 +1343,7 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf)
|
|||
|
||||
/* set the observedEvents or signalReq used in Voip Calls analysis */
|
||||
if (buf != NULL) {
|
||||
*buf = tvb_get_string(wmem_packet_scope(), tvb, tvb_current_offset, (len - tvb_current_offset + offset));
|
||||
*buf = tvb_get_string_enc(wmem_packet_scope(), tvb, tvb_current_offset, (len - tvb_current_offset + offset), ENC_ASCII);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1848,7 +1848,7 @@ dissect_mgcp_connectionparams(proto_tree *parent_tree, tvbuff_t *tvb, gint offse
|
|||
|
||||
/* The P: line */
|
||||
offset += param_type_len; /* skip the P: */
|
||||
tokenline = tvb_get_string(wmem_packet_scope(), tvb, offset, param_val_len);
|
||||
tokenline = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, param_val_len, ENC_ASCII);
|
||||
|
||||
/* Split into type=value pairs separated by comma */
|
||||
tokens = wmem_strsplit(wmem_packet_scope(), tokenline, ",", -1);
|
||||
|
@ -1960,7 +1960,7 @@ dissect_mgcp_localconnectionoptions(proto_tree *parent_tree, tvbuff_t *tvb, gint
|
|||
|
||||
/* The L: line */
|
||||
offset += param_type_len; /* skip the L: */
|
||||
tokenline = tvb_get_string(wmem_packet_scope(), tvb, offset, param_val_len);
|
||||
tokenline = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, param_val_len, ENC_ASCII);
|
||||
|
||||
/* Split into type=value pairs separated by comma */
|
||||
tokens = wmem_strsplit(wmem_packet_scope(), tokenline, ",", -1);
|
||||
|
|
|
@ -1949,7 +1949,7 @@ static void dissect_mih_tlv(tvbuff_t *tvb,int offset, proto_tree *tlv_tree, guin
|
|||
|
||||
case VEND_SPECIFIC_TLV :
|
||||
/*Vendor specific tlv*/
|
||||
proto_tree_add_text(tlv_tree, tvb, offset, length, "Vendor Specific TLV :%s", tvb_get_string(wmem_packet_scope(), tvb, offset, length));
|
||||
proto_tree_add_text(tlv_tree, tvb, offset, length, "Vendor Specific TLV :%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
|
||||
break;
|
||||
|
||||
default :/*did not match type*/
|
||||
|
@ -1957,15 +1957,15 @@ static void dissect_mih_tlv(tvbuff_t *tvb,int offset, proto_tree *tlv_tree, guin
|
|||
|
||||
/*RESERVED TLVs*/
|
||||
if(type > 63 && type < 100)
|
||||
proto_tree_add_text(tlv_tree, tvb, offset, length, "Reserved TLV :%s", tvb_get_string(wmem_packet_scope(), tvb, offset, length));
|
||||
proto_tree_add_text(tlv_tree, tvb, offset, length, "Reserved TLV :%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
|
||||
|
||||
/*EXPERIMENTAL TLVs*/
|
||||
else if(type > 100 && type < 255)
|
||||
proto_tree_add_text(tlv_tree, tvb, offset, length, "Experimental TLV :%s", tvb_get_string(wmem_packet_scope(), tvb, offset, length));
|
||||
proto_tree_add_text(tlv_tree, tvb, offset, length, "Experimental TLV :%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
|
||||
|
||||
/*UNKNOWN TLVs*/
|
||||
else
|
||||
proto_tree_add_text(tlv_tree, tvb, offset, length, "UNKNOWN TLV :%s", tvb_get_string(wmem_packet_scope(), tvb, offset, length));
|
||||
proto_tree_add_text(tlv_tree, tvb, offset, length, "UNKNOWN TLV :%s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -938,7 +938,7 @@ dissect_payload_id(mikey_t *mikey _U_, tvbuff_t *tvb, packet_info *pinfo _U_, pr
|
|||
parent = proto_tree_get_parent(tree);
|
||||
proto_item_append_text(parent, " %s: %s",
|
||||
val_to_str_const(type, id_type_vals, "Unknown"),
|
||||
tvb_get_string(wmem_packet_scope(), tvb, 4, length));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, 4, length, ENC_ASCII));
|
||||
}
|
||||
|
||||
return 4 + length;
|
||||
|
@ -968,7 +968,7 @@ dissect_payload_idr(mikey_t *mikey _U_, tvbuff_t *tvb, packet_info *pinfo _U_, p
|
|||
parent = proto_tree_get_parent(tree);
|
||||
proto_item_append_text(parent, " %s: %s",
|
||||
val_to_str_const(type, id_type_vals, "Unknown"),
|
||||
tvb_get_string(wmem_packet_scope(), tvb, 5, length));
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, 5, length, ENC_ASCII));
|
||||
}
|
||||
|
||||
return 5 + length;
|
||||
|
|
|
@ -526,7 +526,7 @@ get_encoded_strval(tvbuff_t *tvb, guint offset, const char **strval)
|
|||
*strval = "";
|
||||
} else {
|
||||
/* \todo Something with "Char-set", skip for now */
|
||||
*strval = (char *)tvb_get_string(wmem_packet_scope(), tvb, offset + count + 1, length - 1);
|
||||
*strval = (char *)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + count + 1, length - 1, ENC_ASCII);
|
||||
}
|
||||
return count + length;
|
||||
} else
|
||||
|
@ -1279,8 +1279,8 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
|
|||
proto_tree_add_string_format(mmse_tree,
|
||||
hf_mmse_ffheader, tvb, offset,
|
||||
length + length2,
|
||||
tvb_get_string(wmem_packet_scope(), tvb, offset,
|
||||
length + length2),
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset,
|
||||
length + length2, ENC_ASCII),
|
||||
"%s: %s",
|
||||
format_text(strval, strlen(strval)),
|
||||
format_text(strval2, strlen(strval2)));
|
||||
|
|
|
@ -297,7 +297,7 @@ dissect_bson_document(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre
|
|||
gint doc_len = -1; /* Document length */
|
||||
|
||||
e_type = tvb_get_guint8(tvb, offset);
|
||||
tvb_get_stringz(wmem_packet_scope(), tvb, offset+1, &str_len);
|
||||
tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset+1, &str_len, ENC_ASCII);
|
||||
|
||||
element = proto_tree_add_item(elements_tree, hf_mongo_element_name, tvb, offset+1, str_len-1, ENC_UTF_8|ENC_NA);
|
||||
element_sub_tree = proto_item_add_subtree(element, ett_mongo_element);
|
||||
|
@ -351,11 +351,11 @@ dissect_bson_document(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre
|
|||
break;
|
||||
case BSON_ELEMENT_TYPE_REGEX:
|
||||
/* regex pattern */
|
||||
tvb_get_stringz(wmem_packet_scope(), tvb, offset, &str_len);
|
||||
tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &str_len, ENC_ASCII);
|
||||
proto_tree_add_item(element_sub_tree, hf_mongo_element_value_regex_pattern, tvb, offset, str_len, ENC_UTF_8|ENC_NA);
|
||||
offset += str_len;
|
||||
/* regex options */
|
||||
tvb_get_stringz(wmem_packet_scope(), tvb, offset, &str_len);
|
||||
tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &str_len, ENC_ASCII);
|
||||
proto_tree_add_item(element_sub_tree, hf_mongo_element_value_regex_options, tvb, offset, str_len, ENC_UTF_8|ENC_NA);
|
||||
offset += str_len;
|
||||
break;
|
||||
|
|
|
@ -473,35 +473,35 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
sp_end = tvb_find_guint8(tvb, 0, linelen, ' ');
|
||||
if ((sp_end == -1) || (sp_end > tvb_len) || (sp_end > linelen))
|
||||
return -1;
|
||||
field1 = tvb_get_string(wmem_packet_scope(), tvb, 0, sp_end);
|
||||
field1 = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, sp_end, ENC_ASCII);
|
||||
sp_start = sp_end + 1;
|
||||
|
||||
/* length */
|
||||
sp_end = tvb_find_guint8(tvb, sp_start, linelen - sp_start, ' ');
|
||||
if ((sp_end == -1) || (sp_end > tvb_len) || (sp_end > linelen))
|
||||
return -1;
|
||||
field2 = tvb_get_string(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start);
|
||||
field2 = tvb_get_string_enc(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start, ENC_ASCII);
|
||||
sp_start = sp_end + 1;
|
||||
|
||||
/* method, request ID or event */
|
||||
sp_end = tvb_find_guint8(tvb, sp_start, linelen - sp_start, ' ');
|
||||
if ((sp_end == -1) || (sp_end > tvb_len) || (sp_end > linelen))
|
||||
return -1;
|
||||
field3 = tvb_get_string(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start);
|
||||
field3 = tvb_get_string_enc(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start, ENC_ASCII);
|
||||
sp_start = sp_end + 1;
|
||||
|
||||
/* request ID or status code */
|
||||
sp_end = tvb_find_guint8(tvb, sp_start, linelen - sp_start, ' ');
|
||||
if (sp_end == -1)
|
||||
{
|
||||
field4 = tvb_get_string(wmem_packet_scope(), tvb, sp_start, linelen - sp_start);
|
||||
field4 = tvb_get_string_enc(wmem_packet_scope(), tvb, sp_start, linelen - sp_start, ENC_ASCII);
|
||||
line_type = REQUEST_LINE; /* only request line has 4 parameters */
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((sp_end > tvb_len) || (sp_end > linelen))
|
||||
return -1;
|
||||
field4 = tvb_get_string(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start);
|
||||
field4 = tvb_get_string_enc(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start, ENC_ASCII);
|
||||
|
||||
if (isdigit(field3[0])) /* request ID is number, so it has to be response */
|
||||
line_type = RESPONSE_LINE;
|
||||
|
@ -512,7 +512,7 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
sp_end = linelen;
|
||||
if ((sp_end > tvb_len) || (sp_end > linelen))
|
||||
return -1;
|
||||
field5 = tvb_get_string(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start);
|
||||
field5 = tvb_get_string_enc(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start, ENC_ASCII);
|
||||
}
|
||||
|
||||
/* check pdu size */
|
||||
|
@ -641,10 +641,10 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(mrcpv2_tree, hf_mrcpv2_Unknown_Header, tvb, offset, linelen, ENC_UTF_8|ENC_NA);
|
||||
continue;
|
||||
}
|
||||
header_name = tvb_get_string(wmem_packet_scope(), tvb, offset, colon_offset - offset);
|
||||
header_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, colon_offset - offset, ENC_ASCII);
|
||||
ascii_strdown_inplace(header_name);
|
||||
value_offset = tvb_skip_wsp(tvb, colon_offset + 1, offset + linelen - (colon_offset + 1));
|
||||
header_value = tvb_get_string(wmem_packet_scope(), tvb, value_offset, offset + linelen - value_offset);
|
||||
header_value = tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset, offset + linelen - value_offset, ENC_ASCII);
|
||||
|
||||
/* find out header type */
|
||||
header_type = UNKNOWN;
|
||||
|
@ -979,9 +979,9 @@ get_mrcpv2_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
|
|||
/* second string is message length */
|
||||
len_end = tvb_find_guint8(tvb, len_start, MRCPV2_MIN_PDU_LEN - len_start, ' ');
|
||||
if (len_end == -1)
|
||||
msg_len = tvb_get_string(wmem_packet_scope(), tvb, len_start, MRCPV2_MIN_PDU_LEN - len_start);
|
||||
msg_len = tvb_get_string_enc(wmem_packet_scope(), tvb, len_start, MRCPV2_MIN_PDU_LEN - len_start, ENC_ASCII);
|
||||
else
|
||||
msg_len = tvb_get_string(wmem_packet_scope(), tvb, len_start, len_end - len_start);
|
||||
msg_len = tvb_get_string_enc(wmem_packet_scope(), tvb, len_start, len_end - len_start, ENC_ASCII);
|
||||
|
||||
num_msg_len = atoi(msg_len);
|
||||
return num_msg_len;
|
||||
|
@ -1014,7 +1014,7 @@ dissect_mrcpv2_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
|
|||
slash_offset = tvb_find_guint8(tvb, 0, MRCPV2_MIN_LENGTH, '/');
|
||||
if (slash_offset != 4)
|
||||
return 0;
|
||||
version = tvb_get_string(wmem_packet_scope(), tvb, 0, slash_offset);
|
||||
version = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, slash_offset, ENC_ASCII);
|
||||
if (strcmp(version, "MRCP") != 0)
|
||||
return 0;
|
||||
|
||||
|
@ -1025,7 +1025,7 @@ dissect_mrcpv2_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
|
|||
value_size = dot_offset - slash_offset - 1;
|
||||
if ((value_size != 1) && (value_size != 2))
|
||||
return 0;
|
||||
major = tvb_get_string(wmem_packet_scope(), tvb, slash_offset + 1, dot_offset - 1);
|
||||
major = tvb_get_string_enc(wmem_packet_scope(), tvb, slash_offset + 1, dot_offset - 1, ENC_ASCII);
|
||||
value = atoi(major);
|
||||
if (value != 2)
|
||||
return 0;
|
||||
|
@ -1034,12 +1034,12 @@ dissect_mrcpv2_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
|
|||
sp_offset = tvb_find_guint8(tvb, dot_offset + 1, MRCPV2_MIN_LENGTH - dot_offset - 1, ' ');
|
||||
if (sp_offset == -1)
|
||||
{
|
||||
minor = tvb_get_string(wmem_packet_scope(), tvb, dot_offset + 1, MRCPV2_MIN_LENGTH - dot_offset - 1);
|
||||
minor = tvb_get_string_enc(wmem_packet_scope(), tvb, dot_offset + 1, MRCPV2_MIN_LENGTH - dot_offset - 1, ENC_ASCII);
|
||||
len = MRCPV2_MIN_LENGTH;
|
||||
}
|
||||
else
|
||||
{
|
||||
minor = tvb_get_string(wmem_packet_scope(), tvb, dot_offset + 1, MRCPV2_MIN_LENGTH - sp_offset - 1);
|
||||
minor = tvb_get_string_enc(wmem_packet_scope(), tvb, dot_offset + 1, MRCPV2_MIN_LENGTH - sp_offset - 1, ENC_ASCII);
|
||||
len = sp_offset;
|
||||
}
|
||||
value = atoi(minor);
|
||||
|
|
|
@ -440,7 +440,7 @@ static gint dissect_msmms_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
offset += 4;
|
||||
|
||||
/* Protocol name. Must be "MMS"... */
|
||||
if (strncmp((char*)tvb_get_string(wmem_packet_scope(), tvb, offset, 3), "MMS", 3) != 0)
|
||||
if (strncmp((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 3, ENC_ASCII), "MMS", 3) != 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -312,7 +312,7 @@ static int display_application_name(tvbuff_t *tvb, int offset,
|
|||
|
||||
length = tvb_strnlen( tvb, offset, 255);
|
||||
proto_tree_add_text( tree, tvb, offset, length, "Application: %.*s",
|
||||
length, tvb_get_string( wmem_packet_scope(), tvb, offset, length));
|
||||
length, tvb_get_string_enc( wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
|
||||
|
||||
return length;
|
||||
}
|
||||
|
@ -375,7 +375,7 @@ static void dissect_user_info_2(tvbuff_t *tvb, int offset,
|
|||
return;
|
||||
proto_tree_add_text( tree, tvb, offset, length + 1,
|
||||
"User name: %.*s", length,
|
||||
tvb_get_string( wmem_packet_scope(), tvb, offset, length));
|
||||
tvb_get_string_enc( wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
|
||||
offset += length + 2;
|
||||
|
||||
length = tvb_strnlen( tvb, offset, 255);
|
||||
|
@ -383,7 +383,7 @@ static void dissect_user_info_2(tvbuff_t *tvb, int offset,
|
|||
return;
|
||||
proto_tree_add_text( tree, tvb, offset, length + 1,
|
||||
"Application name: %.*s", length,
|
||||
tvb_get_string( wmem_packet_scope(), tvb, offset, length));
|
||||
tvb_get_string_enc( wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
|
||||
offset += length + 1;
|
||||
|
||||
length = tvb_strnlen( tvb, offset, 255);
|
||||
|
@ -391,7 +391,7 @@ static void dissect_user_info_2(tvbuff_t *tvb, int offset,
|
|||
return;
|
||||
proto_tree_add_text( tree, tvb, offset, length + 1,
|
||||
"Client computer name: %.*s", length,
|
||||
tvb_get_string( wmem_packet_scope(), tvb, offset, length));
|
||||
tvb_get_string_enc( wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -580,7 +580,7 @@ static void dissect_request_resolve(tvbuff_t *tvb, int offset,
|
|||
if ( tree){
|
||||
ti = proto_tree_add_text(tree, tvb, offset, length + 1,
|
||||
"Host Name: %.*s", length,
|
||||
tvb_get_string( wmem_packet_scope(), tvb, offset + 18, length));
|
||||
tvb_get_string_enc( wmem_packet_scope(), tvb, offset + 18, length, ENC_ASCII));
|
||||
|
||||
name_tree = proto_item_add_subtree(ti, ett_msproxy_name);
|
||||
|
||||
|
@ -591,7 +591,7 @@ static void dissect_request_resolve(tvbuff_t *tvb, int offset,
|
|||
offset += 17;
|
||||
|
||||
proto_tree_add_text( name_tree, tvb, offset, length, "String: %s",
|
||||
tvb_get_string( wmem_packet_scope(), tvb, offset, length));
|
||||
tvb_get_string_enc( wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -811,7 +811,7 @@ static void dissect_auth_1_ack(tvbuff_t *tvb, int offset,
|
|||
|
||||
/* XXX - always 255? */
|
||||
proto_tree_add_text( tree, tvb, offset, 255, "NT domain: %.255s",
|
||||
tvb_get_string( wmem_packet_scope(), tvb, offset, 255));
|
||||
tvb_get_string_enc( wmem_packet_scope(), tvb, offset, 255, ENC_ASCII));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ base64_decode(packet_info *pinfo, tvbuff_t *b64_tvb, char *name)
|
|||
{
|
||||
char *data;
|
||||
tvbuff_t *tvb;
|
||||
data = tvb_get_string(wmem_packet_scope(), b64_tvb, 0, tvb_length(b64_tvb));
|
||||
data = tvb_get_string_enc(wmem_packet_scope(), b64_tvb, 0, tvb_length(b64_tvb), ENC_ASCII);
|
||||
|
||||
tvb = base64_to_tvb(b64_tvb, data);
|
||||
add_new_data_source(pinfo, tvb, name);
|
||||
|
@ -610,7 +610,7 @@ process_body_part(proto_tree *tree, tvbuff_t *tvb, const guint8 *boundary,
|
|||
break;
|
||||
}
|
||||
|
||||
hdr_str = tvb_get_string(wmem_packet_scope(), tvb, offset, next_offset - offset);
|
||||
hdr_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, next_offset - offset, ENC_ASCII);
|
||||
|
||||
header_str = unfold_and_compact_mime_header(hdr_str, &colon_offset);
|
||||
if (colon_offset <= 0) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue