diff --git a/asn1/ansi_tcap/ansi_tcap.cnf b/asn1/ansi_tcap/ansi_tcap.cnf index 8c34bd64b6..4291b60104 100644 --- a/asn1/ansi_tcap/ansi_tcap.cnf +++ b/asn1/ansi_tcap/ansi_tcap.cnf @@ -168,9 +168,9 @@ if(next_tvb) { * in the 8 octets case. */ if (len > 4){ - ansi_tcap_private.TransactionID_str = tvb_bytes_to_ep_str(next_tvb, 4,len-4); + ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(wmem_packet_scope(), next_tvb, 4,len-4); }else{ - ansi_tcap_private.TransactionID_str = tvb_bytes_to_ep_str(next_tvb, 0,len); + ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(wmem_packet_scope(), next_tvb, 0,len); } } switch(len) { diff --git a/asn1/c1222/packet-c1222-template.c b/asn1/c1222/packet-c1222-template.c index 3b7f62edf9..32218e2dad 100644 --- a/asn1/c1222/packet-c1222-template.c +++ b/asn1/c1222/packet-c1222-template.c @@ -441,7 +441,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm proto_tree_add_uint(tree, hf_c1222_auth_len, tvb, *offset, 1, auth_len); *offset += 1; if (*length >= auth_len) { - auth_req = tvb_bytes_to_ep_str(tvb, *offset, auth_len); + auth_req = tvb_bytes_to_str(wmem_packet_scope(), tvb, *offset, auth_len); proto_tree_add_item(tree, hf_c1222_auth_data, tvb, *offset, auth_len, ENC_NA); *offset += auth_len; *length -= auth_len + 1; diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf index 018807d8ce..b69de9f854 100644 --- a/asn1/h248/h248.cnf +++ b/asn1/h248/h248.cnf @@ -406,7 +406,7 @@ AuditReplyV1/auditResult audit_result /* not ascii or NULL character so do string as hex string */ proto_tree_add_text(tree, tvb, offset, len,"%s: 0x%s", (proto_registrar_get_nth(hf_index))->name, - tvb_bytes_to_ep_str(tvb, 0, len)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, len)); return len; }; }; diff --git a/asn1/t38/t38.cnf b/asn1/t38/t38.cnf index 3a0ab1f7f8..3a769e1aa2 100644 --- a/asn1/t38/t38.cnf +++ b/asn1/t38/t38.cnf @@ -158,11 +158,11 @@ VAL_PTR=&Data_Field_field_type_value if (primary_part){ if(value_len < 8){ col_append_fstr(actx->pinfo->cinfo, COL_INFO, "[%s]", - tvb_bytes_to_ep_str(value_tvb,0,value_len)); + tvb_bytes_to_str(wmem_packet_scope(), value_tvb,0,value_len)); } else { col_append_fstr(actx->pinfo->cinfo, COL_INFO, "[%s...]", - tvb_bytes_to_ep_str(value_tvb,0,7)); + tvb_bytes_to_str(wmem_packet_scope(), value_tvb,0,7)); } } diff --git a/debian/libwireshark0.symbols b/debian/libwireshark0.symbols index 38bf1010fa..2f7a97e104 100644 --- a/debian/libwireshark0.symbols +++ b/debian/libwireshark0.symbols @@ -1294,9 +1294,8 @@ libwireshark.so.0 libwireshark0 #MINVER# tvb_address_var_to_str@Base 1.99.2 tvb_bcd_dig_to_wmem_packet_str@Base 1.12.0~rc1 tvb_bytes_exist@Base 1.9.1 - tvb_bytes_to_ep_str@Base 1.12.0~rc1 + tvb_bytes_to_str@Base 1.99.2 tvb_bytes_to_str_punct@Base 1.99.2 - tvb_bytes_to_wmem_str@Base 1.99.2 tvb_captured_length@Base 1.12.0~rc1 tvb_captured_length_remaining@Base 1.12.0~rc1 tvb_child_uncompress@Base 1.12.0~rc1 diff --git a/epan/dissectors/packet-aarp.c b/epan/dissectors/packet-aarp.c index 21cd7da3be..142b0e729a 100644 --- a/epan/dissectors/packet-aarp.c +++ b/epan/dissectors/packet-aarp.c @@ -120,7 +120,7 @@ tvb_aarphrdaddr_to_str(tvbuff_t *tvb, gint offset, int ad_len, guint16 type) of address). */ return tvb_ether_to_str(tvb, offset); } - return tvb_bytes_to_ep_str(tvb, offset, ad_len); + return tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, ad_len); } static gchar * @@ -130,7 +130,7 @@ tvb_aarpproaddr_to_str(tvbuff_t *tvb, gint offset, int ad_len, guint16 type) /* Appletalk address. */ return tvb_atalkid_to_str(tvb, offset); } - return tvb_bytes_to_ep_str(tvb, offset, ad_len); + return tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, ad_len); } /* Offsets of fields within an AARP packet. */ diff --git a/epan/dissectors/packet-alcap.c b/epan/dissectors/packet-alcap.c index 7be45e4c89..147a1fdb51 100644 --- a/epan/dissectors/packet-alcap.c +++ b/epan/dissectors/packet-alcap.c @@ -593,7 +593,7 @@ static const gchar* dissect_fields_dnsea(packet_info* pinfo _U_, tvbuff_t *tvb, return NULL; } - msg_info->dest_nsap = tvb_bytes_to_ep_str(tvb,offset,20); + msg_info->dest_nsap = tvb_bytes_to_str(wmem_packet_scope(), tvb,offset,20); proto_tree_add_item(tree, hf_alcap_dnsea, tvb, offset, 20, ENC_NA); dissect_nsap(tvb, offset,20, tree); @@ -613,7 +613,7 @@ static const gchar* dissect_fields_onsea(packet_info* pinfo _U_, tvbuff_t *tvb, return NULL; } - msg_info->orig_nsap = tvb_bytes_to_ep_str(tvb,offset,20); + msg_info->orig_nsap = tvb_bytes_to_str(wmem_packet_scope(), tvb,offset,20); proto_tree_add_item(tree, hf_alcap_onsea, tvb, offset, 20, ENC_NA); dissect_nsap(tvb, offset,20, tree); diff --git a/epan/dissectors/packet-amqp.c b/epan/dissectors/packet-amqp.c index 7362ee87e3..a206d2ddee 100644 --- a/epan/dissectors/packet-amqp.c +++ b/epan/dissectors/packet-amqp.c @@ -10546,7 +10546,7 @@ format_amqp_1_0_bin(tvbuff_t *tvb, return length; } AMQP_INCREMENT(offset, length, bound); - *value = tvb_bytes_to_ep_str(tvb, offset, bin_length); + *value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, bin_length); return (length+bin_length); } @@ -10623,7 +10623,7 @@ format_amqp_0_10_bin(tvbuff_t *tvb, guint offset, guint bound _U_, guint length, const char **value) { - *value = tvb_bytes_to_ep_str(tvb, offset, length); + *value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length); return length; } @@ -10708,7 +10708,7 @@ format_amqp_0_10_vbin(tvbuff_t *tvb, return length; } AMQP_INCREMENT(offset, length, bound); - *value = tvb_bytes_to_ep_str(tvb, offset, bin_length); + *value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, bin_length); AMQP_INCREMENT(offset, bin_length, bound); return (bin_length + length); } diff --git a/epan/dissectors/packet-ansi_tcap.c b/epan/dissectors/packet-ansi_tcap.c index 9935d845eb..a2068622a3 100644 --- a/epan/dissectors/packet-ansi_tcap.c +++ b/epan/dissectors/packet-ansi_tcap.c @@ -622,9 +622,9 @@ if(next_tvb) { * in the 8 octets case. */ if (len > 4){ - ansi_tcap_private.TransactionID_str = tvb_bytes_to_ep_str(next_tvb, 4,len-4); + ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(wmem_packet_scope(), next_tvb, 4,len-4); }else{ - ansi_tcap_private.TransactionID_str = tvb_bytes_to_ep_str(next_tvb, 0,len); + ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(wmem_packet_scope(), next_tvb, 0,len); } } switch(len) { diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c index 7cdf042a5e..5ab5edf64e 100644 --- a/epan/dissectors/packet-arp.c +++ b/epan/dissectors/packet-arp.c @@ -373,7 +373,7 @@ tvb_arphrdaddr_to_str(tvbuff_t *tvb, gint offset, int ad_len, guint16 type) address). */ return tvb_ether_to_str(tvb, offset); } - return tvb_bytes_to_ep_str(tvb, offset, ad_len); + return tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, ad_len); } static const gchar * diff --git a/epan/dissectors/packet-bacapp.c b/epan/dissectors/packet-bacapp.c index ba2dfe4daa..bc4dd2e479 100644 --- a/epan/dissectors/packet-bacapp.c +++ b/epan/dissectors/packet-bacapp.c @@ -5897,7 +5897,7 @@ fOctetString(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, offset += fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt); if (lvt > 0) { - tmp = tvb_bytes_to_ep_str(tvb, offset, lvt); + tmp = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, lvt); subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt, ett_bacapp_tag, NULL, "%s %s", label, tmp); offset += lvt; @@ -5933,7 +5933,7 @@ fMacAddress(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, c } else { /* we have 1 Byte MS/TP Address or anything else interpreted as an address */ subtree = proto_tree_add_subtree(tree, tvb, offset, lvt, - ett_bacapp_tag, NULL, tvb_bytes_to_ep_str(tvb, offset, lvt)); + ett_bacapp_tag, NULL, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, lvt)); } } offset += lvt; diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c index 19d58d9ca4..b835eac523 100644 --- a/epan/dissectors/packet-bgp.c +++ b/epan/dissectors/packet-bgp.c @@ -6149,7 +6149,7 @@ dissect_bgp_path_attr(proto_tree *subtree, tvbuff_t *tvb, guint16 path_attr_len, case TUNNEL_SUBTLV_ENCAPSULATION: if (encaps_tunnel_type == TUNNEL_TYPE_L2TP_OVER_IP) { proto_tree_add_text(subtree6, tvb, q + 2, 4, "Session ID: %u", tvb_get_letohl(tvb, q + 2)); - proto_tree_add_text(subtree6, tvb, q + 6, encaps_tunnel_sublen - 4, "Cookie: %s", tvb_bytes_to_ep_str(tvb, q + 6, encaps_tunnel_sublen - 4)); + proto_tree_add_text(subtree6, tvb, q + 6, encaps_tunnel_sublen - 4, "Cookie: %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, q + 6, encaps_tunnel_sublen - 4)); } else if (encaps_tunnel_type == TUNNEL_TYPE_GRE) { proto_tree_add_text(subtree6, tvb, q + 2, encaps_tunnel_sublen, "GRE key: %x", tvb_get_letohl(tvb, q + 2)); } diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index dca21900d1..43a50c6cf3 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -1899,7 +1899,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, proto_item val_to_str_ext_const( enterprise, &sminmpec_values_ext, "Unknown"), enterprise); if (optlen > 6) { - buf = tvb_bytes_to_ep_str(tvb, optoff + 6, optlen - 11); + buf = tvb_bytes_to_str(wmem_packet_scope(), tvb, optoff + 6, optlen - 11); proto_tree_add_text(v_tree, tvb, optoff + 6, optlen - 11, "identifier: %s", buf); } diff --git a/epan/dissectors/packet-bt-dht.c b/epan/dissectors/packet-bt-dht.c index e6089bc56a..84184552ae 100644 --- a/epan/dissectors/packet-bt-dht.c +++ b/epan/dissectors/packet-bt-dht.c @@ -128,7 +128,7 @@ dissect_bencoded_string(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, /* fill the return data */ if( tohex ) - *result = tvb_bytes_to_ep_str(tvb, offset, string_len ); + *result = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, string_len ); else *result = tvb_get_string_enc( wmem_packet_scope(), tvb, offset, string_len , ENC_ASCII); @@ -318,7 +318,7 @@ dissect_bt_dht_nodes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint node_tree = proto_item_add_subtree( node_ti, ett_bt_dht_peers); proto_tree_add_item( node_tree, hf_bt_dht_id, tvb, offset, 20, ENC_NA); - proto_item_append_text(node_ti, " (id: %s", tvb_bytes_to_ep_str(tvb, offset, 20)); + proto_item_append_text(node_ti, " (id: %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 20)); proto_tree_add_item( node_tree, hf_ip, tvb, offset+20, 4, ENC_BIG_ENDIAN); proto_item_append_text(node_ti, ", IP/Port: %s", tvb_ip_to_str(tvb, offset+20)); proto_tree_add_item( node_tree, hf_port, tvb, offset+24, 2, ENC_BIG_ENDIAN); diff --git a/epan/dissectors/packet-btsdp.c b/epan/dissectors/packet-btsdp.c index 3bd004da99..0fe6837e54 100644 --- a/epan/dissectors/packet-btsdp.c +++ b/epan/dissectors/packet-btsdp.c @@ -1439,14 +1439,12 @@ reassemble_continuation_state(tvbuff_t *tvb, packet_info *pinfo, } else { guint8 *continuation_state_buffer; guint8 continuation_state_length; - guint8 *packet_scope_string; continuation_state_length = tvb_get_guint8(tvb, offset); offset++; continuation_state_buffer = (guint8 *) wmem_alloc(wmem_file_scope(), continuation_state_length); - packet_scope_string = tvb_bytes_to_ep_str(tvb, offset, continuation_state_length); - memcpy(continuation_state_buffer, packet_scope_string, continuation_state_length); + continuation_state_buffer = tvb_bytes_to_str(wmem_file_scope(), tvb, offset, continuation_state_length); if (!pinfo->fd->flags.visited) { if (is_request) { @@ -2866,7 +2864,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, break; case 0x352: proto_tree_add_item(next_tree, hf_bpp_character_repertoires_support, tvb, offset, size, ENC_NA); - new_str = tvb_bytes_to_ep_str(tvb, offset, size); + new_str = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, size); wmem_strbuf_append(info_buf, new_str); break; case 0x354: diff --git a/epan/dissectors/packet-c1222.c b/epan/dissectors/packet-c1222.c index 2c1f752ff2..ae0ad91721 100644 --- a/epan/dissectors/packet-c1222.c +++ b/epan/dissectors/packet-c1222.c @@ -492,7 +492,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm proto_tree_add_uint(tree, hf_c1222_auth_len, tvb, *offset, 1, auth_len); *offset += 1; if (*length >= auth_len) { - auth_req = tvb_bytes_to_ep_str(tvb, *offset, auth_len); + auth_req = tvb_bytes_to_str(wmem_packet_scope(), tvb, *offset, auth_len); proto_tree_add_item(tree, hf_c1222_auth_data, tvb, *offset, auth_len, ENC_NA); *offset += auth_len; *length -= auth_len + 1; diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c index 36d47daefe..5403b23bc9 100644 --- a/epan/dissectors/packet-cdp.c +++ b/epan/dissectors/packet-cdp.c @@ -1138,7 +1138,7 @@ dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree) if (hf_addr == -1) { proto_tree_add_item(address_tree, hf_cdp_address, tvb, offset, address_length, ENC_NA); - proto_item_set_text(ti, "Address: %s", tvb_bytes_to_ep_str(tvb, offset, address_length)); + proto_item_set_text(ti, "Address: %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, address_length)); } return 2 + protocol_length + 2 + address_length; diff --git a/epan/dissectors/packet-ceph.c b/epan/dissectors/packet-ceph.c index eb335b5d27..40a85f2008 100644 --- a/epan/dissectors/packet-ceph.c +++ b/epan/dissectors/packet-ceph.c @@ -1810,7 +1810,7 @@ guint c_dissect_blob(proto_tree *root, int hf, int hf_data, int hf_len, if (size) { proto_item_append_text(ti, ", Data: %s", - tvb_bytes_to_ep_str(tvb, off+4, size)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, off+4, size)); } proto_tree_add_item(tree, hf_len, diff --git a/epan/dissectors/packet-dcerpc-netlogon.c b/epan/dissectors/packet-dcerpc-netlogon.c index ca919c1bf5..bcb15f98bf 100644 --- a/epan/dissectors/packet-dcerpc-netlogon.c +++ b/epan/dissectors/packet-dcerpc-netlogon.c @@ -1163,7 +1163,7 @@ static void dissect_nt_chal_resp_cb(packet_info *pinfo _U_, proto_tree *tree, start_offset += 12; len = end_offset - start_offset; - s = tvb_bytes_to_ep_str(tvb, start_offset, len); + s = tvb_bytes_to_str(wmem_packet_scope(), tvb, start_offset, len); /* Append string to upper-level proto_items */ diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c index bc4b52dc54..36518c4462 100644 --- a/epan/dissectors/packet-dcerpc-nt.c +++ b/epan/dissectors/packet-dcerpc-nt.c @@ -297,8 +297,7 @@ static void cb_byte_array_postprocess(packet_info *pinfo, proto_tree *tree _U_, if ((end_offset - start_offset) <= 12) return; - s = tvb_bytes_to_ep_str( - tvb, start_offset + 12, (end_offset - start_offset - 12) ); + s = tvb_bytes_to_str(wmem_packet_scope(), tvb, start_offset + 12, (end_offset - start_offset - 12) ); /* Append string to COL_INFO */ diff --git a/epan/dissectors/packet-dect.c b/epan/dissectors/packet-dect.c index de061de3df..f7500ae2da 100644 --- a/epan/dissectors/packet-dect.c +++ b/epan/dissectors/packet-dect.c @@ -1477,9 +1477,9 @@ dissect_afield(gboolean dect_packet_type, guint8 *ba, proto_tree_add_string(ColumnsTree, hf_dect_cc_TA, tvb, offset, 1, "[Ct]"); if(ta==DECT_TA_CT0) - wmem_strbuf_append_printf(afield_str,"C-Channel Next Data: %s",tvb_bytes_to_ep_str(tvb, offset, 5)); + wmem_strbuf_append_printf(afield_str,"C-Channel Next Data: %s",tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 5)); else - wmem_strbuf_append_printf(afield_str,"C-Channel First Data: %s",tvb_bytes_to_ep_str(tvb, offset, 5)); + wmem_strbuf_append_printf(afield_str,"C-Channel First Data: %s",tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 5)); proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str)); } @@ -1488,7 +1488,7 @@ dissect_afield(gboolean dect_packet_type, guint8 *ba, /* ETSI EN 300 175-3 V2.3.0 7.2.2 */ proto_tree_add_string(ColumnsTree, hf_dect_cc_TA, tvb, offset, 1, "[Nt]"); - wmem_strbuf_append_printf(afield_str,"RFPI: %s",tvb_bytes_to_ep_str(tvb, offset, 5)); + wmem_strbuf_append_printf(afield_str,"RFPI: %s",tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 5)); proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str)); proto_tree_add_item(atailti, hf_dect_A_Tail_Nt, tvb, offset, 5, ENC_NA); @@ -1658,7 +1658,7 @@ dissect_afield(gboolean dect_packet_type, guint8 *ba, proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_6_Spare, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; - wmem_strbuf_append_printf(afield_str,"Multi-Frame No.: %s",tvb_bytes_to_ep_str(tvb, offset, 3)); + wmem_strbuf_append_printf(afield_str,"Multi-Frame No.: %s",tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 3)); proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str)); proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_6_Mfn, tvb, offset, 3, ENC_NA); @@ -1669,7 +1669,7 @@ dissect_afield(gboolean dect_packet_type, guint8 *ba, break; case 7: /* Escape */ /* ETSI EN 300 175-3 V2.3.0 7.2.3.8 */ - wmem_strbuf_append_printf(afield_str,"Escape Data: %s",tvb_bytes_to_ep_str(tvb, offset, 5)); + wmem_strbuf_append_printf(afield_str,"Escape Data: %s",tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 5)); proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str)); break; case 8: /* Obsolete */ diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c index cf5d2da812..623704bed2 100644 --- a/epan/dissectors/packet-dhcpv6.c +++ b/epan/dissectors/packet-dhcpv6.c @@ -1103,7 +1103,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i } else { proto_item_append_text(ti, "%s", - tvb_bytes_to_ep_str(tvb, sub_off, field_len)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, sub_off, field_len)); } break; case CL_OPTION_TLV5: @@ -1211,13 +1211,13 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i else { /*proto_item_append_text(ti, "CM MAC Address Option = %s", */ proto_item_append_text(ti, "%s", tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, sub_off, opt_len, ':')); - /* tvb_bytes_to_ep_str(tvb, sub_off, opt_len)); */ + /* tvb_bytes_to_str(wmem_packet_scope(), tvb, sub_off, opt_len)); */ } break; case CL_EROUTER_CONTAINER_OPTION: opt_len = tlv_len; proto_item_append_text(ti, " %s (len=%d)", - tvb_bytes_to_ep_str(tvb, sub_off, opt_len), tlv_len); + tvb_bytes_to_str(wmem_packet_scope(), tvb, sub_off, opt_len), tlv_len); break; case CL_OPTION_CCC: opt_len = tlv_len; @@ -1315,7 +1315,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, switch (opttype) { case OPTION_CLIENTID: - col_append_fstr(pinfo->cinfo, COL_INFO, "CID: %s ", tvb_bytes_to_ep_str(tvb, off, optlen)); + col_append_fstr(pinfo->cinfo, COL_INFO, "CID: %s ", tvb_bytes_to_str(wmem_packet_scope(), tvb, off, optlen)); /* Fall through */ case OPTION_SERVERID: case OPTION_RELAYID: diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c index bcb02ce5d9..f49d0c9b6d 100644 --- a/epan/dissectors/packet-dmp.c +++ b/epan/dissectors/packet-dmp.c @@ -2681,7 +2681,7 @@ static gint dissect_mts_identifier (tvbuff_t *tvb, packet_info *pinfo _U_, proto } else if (dmp_nat_decode == NAT_DECODE_THALES) { mts_id = dissect_thales_mts_id (tvb, offset, dmp.mts_id_length); } else { - mts_id = tvb_bytes_to_ep_str (tvb, offset, dmp.mts_id_length); + mts_id = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, dmp.mts_id_length); } proto_item_append_text (dmp.mts_id_item, " (%zu bytes decompressed)", strlen (mts_id)); mts_id = format_text (mts_id, strlen (mts_id)); @@ -2732,7 +2732,7 @@ static gint dissect_ipm_identifier (tvbuff_t *tvb, packet_info *pinfo _U_, proto } else if (dmp_nat_decode == NAT_DECODE_THALES) { ipm_id = dissect_thales_ipm_id (tvb, offset, ipm_id_length, modifier); } else { - ipm_id = tvb_bytes_to_ep_str (tvb, offset, ipm_id_length); + ipm_id = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, ipm_id_length); } proto_item_append_text (tf, " (%zu bytes decompressed)", strlen (ipm_id)); ipm_id = format_text (ipm_id, strlen (ipm_id)); diff --git a/epan/dissectors/packet-edonkey.c b/epan/dissectors/packet-edonkey.c index 3187aefb76..4d6d4c526d 100644 --- a/epan/dissectors/packet-edonkey.c +++ b/epan/dissectors/packet-edonkey.c @@ -1067,7 +1067,7 @@ static int dissect_kademlia_tag_bsob(tvbuff_t *tvb, packet_info *pinfo _U_, guint16 bsob_length; bsob_length = tvb_get_guint8(tvb, offset); - *string_value = tvb_bytes_to_ep_str( tvb, offset + 1, bsob_length ); + *string_value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 1, bsob_length ); proto_tree_add_item(tree, hf_kademlia_tag_bsob, tvb, offset + 1, bsob_length, ENC_NA); return offset + 1 + bsob_length; @@ -2366,7 +2366,7 @@ static int dissect_kademlia_tag(tvbuff_t *tvb, packet_info *pinfo _U_, switch( type ) { case KADEMLIA_TAGTYPE_HASH: - proto_item_append_text( tag_node, "%s", tvb_bytes_to_ep_str( tvb, offset, 16 )); + proto_item_append_text( tag_node, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 16 )); offset = dissect_kademlia_tag_hash( tvb, pinfo, offset, subtree ); break; case KADEMLIA_TAGTYPE_STRING: diff --git a/epan/dissectors/packet-etsi_card_app_toolkit.c b/epan/dissectors/packet-etsi_card_app_toolkit.c index af28867634..2f2c601d57 100644 --- a/epan/dissectors/packet-etsi_card_app_toolkit.c +++ b/epan/dissectors/packet-etsi_card_app_toolkit.c @@ -1001,7 +1001,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) ti = proto_tree_add_bytes_format(cat_tree, hf_cat_tlv, tvb, pos, len, ptr, "%s: %s", val_to_str_ext(tag, &comp_tlv_tag_vals_ext, "%02x"), - (const guint8 *)tvb_bytes_to_ep_str(tvb, pos, len)); + (const guint8 *)tvb_bytes_to_str(wmem_packet_scope(), tvb, pos, len)); #else ti = proto_tree_add_bytes_format(cat_tree, hf_cat_tlv, tvb, pos, len, ptr, "%s: ", diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c index 08f80832b0..c18269c150 100644 --- a/epan/dissectors/packet-gsm_a_gm.c +++ b/epan/dissectors/packet-gsm_a_gm.c @@ -5454,7 +5454,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of switch (param) { case 0x01: proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Authorization token value: 0x%s", - tvb_bytes_to_ep_str(tvb, curr_offset, pf_length)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, curr_offset, pf_length)); break; case 0x02: @@ -5474,7 +5474,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of default: proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Parameter content: 0x%s", - tvb_bytes_to_ep_str(tvb, curr_offset, pf_length)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, curr_offset, pf_length)); break; } curr_offset += pf_length; diff --git a/epan/dissectors/packet-gsm_abis_om2000.c b/epan/dissectors/packet-gsm_abis_om2000.c index 2372aeb3f5..6f12530667 100644 --- a/epan/dissectors/packet-gsm_abis_om2000.c +++ b/epan/dissectors/packet-gsm_abis_om2000.c @@ -585,7 +585,7 @@ dissect_om2k_attr_unkn(tvbuff_t *tvb, gint offset, gint len, gint iei, proto_tre offset, len, NULL, "%s: %s", val_to_str_ext(iei, &om2k_attr_vals_ext, "0x%02x"), - tvb_bytes_to_ep_str(tvb, offset, len)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len)); return len; } diff --git a/epan/dissectors/packet-gsm_sim.c b/epan/dissectors/packet-gsm_sim.c index 428c547410..7c9016ccbf 100644 --- a/epan/dissectors/packet-gsm_sim.c +++ b/epan/dissectors/packet-gsm_sim.c @@ -1190,7 +1190,7 @@ dissect_gsm_apdu(guint8 ins, guint8 p1, guint8 p2, guint8 p3, tvbuff_t *tvb, break; case 0x04: /* select by AID */ col_append_fstr(pinfo->cinfo, COL_INFO, "Application %s ", - tvb_bytes_to_ep_str(tvb, offset+DATA_OFFS, p3)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+DATA_OFFS, p3)); proto_tree_add_item(tree, hf_aid, tvb, offset+DATA_OFFS, p3, ENC_NA); break; diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c index 8ae6e8fc09..1ac488dc2e 100644 --- a/epan/dissectors/packet-gtp.c +++ b/epan/dissectors/packet-gtp.c @@ -5773,7 +5773,7 @@ gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb, packet_info* p break; } - return tvb_bytes_to_ep_str(tvb, 0, length); + return tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, length); } /* diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c index 04ac7bf896..cdd1638b41 100644 --- a/epan/dissectors/packet-gtpv2.c +++ b/epan/dissectors/packet-gtpv2.c @@ -2392,7 +2392,7 @@ dissect_gtpv2_f_teid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pr proto_tree_add_item(tree, hf_gtpv2_f_teid_gre_key, tvb, offset, 4, ENC_BIG_ENDIAN); proto_item_append_text(item, "%s, TEID/GRE Key: 0x%s", val_to_str_ext_const((flags & 0x3f), >pv2_f_teid_interface_type_vals_ext, "Unknown"), - tvb_bytes_to_ep_str(tvb, offset, 4)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 4)); offset += 4; if (flags & 0x80) @@ -3859,7 +3859,7 @@ dissect_gtpv2_p_tmsi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pr /* The TMSI consists of 4 octets. It can be coded using a full hexadecimal representation. */ proto_tree_add_item(tree, hf_gtpv2_p_tmsi, tvb, offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(item, "%s", tvb_bytes_to_ep_str(tvb, offset, 4)); + proto_item_append_text(item, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 4)); } /* @@ -3872,7 +3872,7 @@ dissect_gtpv2_p_tmsi_sig(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree /* The P-TMSI Signature consists of 3 octets and may be allocated by the SGSN. */ proto_tree_add_item(tree, hf_gtpv2_p_tmsi_sig, tvb, offset, 3, ENC_BIG_ENDIAN); - proto_item_append_text(item, "%s", tvb_bytes_to_ep_str(tvb, offset, 3)); + proto_item_append_text(item, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 3)); } @@ -4817,7 +4817,7 @@ dissect_gtpv2_mbms_flow_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr int offset = 0; /* Two octets OctetString. */ proto_tree_add_item(tree, hf_gtpv2_mbms_flow_id, tvb, offset, 2, ENC_NA); - proto_item_append_text(item, " %s", tvb_bytes_to_ep_str(tvb, offset, 2)); + proto_item_append_text(item, " %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 2)); offset += 2; if (length > 2) diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c index 24de3dfe14..bc129f8859 100644 --- a/epan/dissectors/packet-h248.c +++ b/epan/dissectors/packet-h248.c @@ -5368,7 +5368,7 @@ dissect_h248_ValueV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U /* not ascii or NULL character so do string as hex string */ proto_tree_add_text(tree, tvb, offset, len,"%s: 0x%s", (proto_registrar_get_nth(hf_index))->name, - tvb_bytes_to_ep_str(tvb, 0, len)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, len)); return len; }; }; diff --git a/epan/dissectors/packet-h248_annex_c.c b/epan/dissectors/packet-h248_annex_c.c index 97e61f09fe..04f6189f82 100644 --- a/epan/dissectors/packet-h248_annex_c.c +++ b/epan/dissectors/packet-h248_annex_c.c @@ -765,7 +765,7 @@ static void dissect_h248_annexc_BIR(proto_tree* tree, dissect_ber_octet_string(implicit_p ? *((gboolean*)implicit_p) : FALSE, &asn1_ctx, tree, tvb, 0, hfid, &new_tvb); if ( new_tvb && h248_info->term && ! h248_info->term->bir ) { - h248_info->term->bir = wmem_strdup(wmem_file_scope(), tvb_bytes_to_ep_str(new_tvb,0,tvb_reported_length(new_tvb))); + h248_info->term->bir = tvb_bytes_to_str(wmem_file_scope(), new_tvb,0,tvb_reported_length(new_tvb)); } } @@ -783,7 +783,7 @@ static void dissect_h248_annexc_NSAP(proto_tree* tree, if (new_tvb) { dissect_nsap(new_tvb, 0,tvb_reported_length(new_tvb), tree); if ( h248_info->term && ! h248_info->term->nsap) { - h248_info->term->nsap = wmem_strdup(wmem_file_scope(), tvb_bytes_to_ep_str(new_tvb,0,tvb_reported_length(new_tvb))); + h248_info->term->nsap = tvb_bytes_to_str(wmem_file_scope(), new_tvb,0,tvb_reported_length(new_tvb)); } } } diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 327a73c810..593ce37fbc 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -10435,7 +10435,7 @@ dissect_vendor_ie_aruba(proto_item *item, proto_tree *ietree, default: proto_tree_add_item(ietree, hf_ieee80211_vs_aruba_data, tvb, offset, tag_len, ENC_NA); - proto_item_append_text(item, " (Data: %s)", tvb_bytes_to_ep_str(tvb, offset, tag_len)); + proto_item_append_text(item, " (Data: %s)", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, tag_len)); break; } } diff --git a/epan/dissectors/packet-ipp.c b/epan/dissectors/packet-ipp.c index 412928acd8..0236b60fcc 100644 --- a/epan/dissectors/packet-ipp.c +++ b/epan/dissectors/packet-ipp.c @@ -612,7 +612,7 @@ add_octetstring_tree(proto_tree *tree, tvbuff_t *tvb, int offset, 1 + 2 + name_length + 2 + value_length, ett_ipp_attr, NULL, "%s: %s", tvb_format_text(tvb, offset + 1 + 2, name_length), - tvb_bytes_to_ep_str(tvb, offset + 1 + 2 + name_length + 2, value_length)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 1 + 2 + name_length + 2, value_length)); } static void diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c index 6e6739eef3..04adbc9ba6 100644 --- a/epan/dissectors/packet-ipx.c +++ b/epan/dissectors/packet-ipx.c @@ -1004,7 +1004,7 @@ dissect_serialization(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } col_add_fstr(pinfo->cinfo, COL_INFO, "Serial number %s", - tvb_bytes_to_ep_str(tvb, 0, 6)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, 6)); proto_tree_add_item(ser_tree, hf_serial_number, tvb, 0, 6, ENC_NA); } diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c index 6a2c3d26f4..6afb452314 100644 --- a/epan/dissectors/packet-isakmp.c +++ b/epan/dissectors/packet-isakmp.c @@ -3019,7 +3019,7 @@ dissect_sa(tvbuff_t *tvb, int offset, int length, proto_tree *tree, int isakmp_v proto_tree_add_bytes_format_value(tree, hf_isakmp_sa_situation, tvb, offset, length, NULL, "%s (length is %u, should be >= 4)", - tvb_bytes_to_ep_str(tvb, offset, length), length); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length), length); return; } sti = proto_tree_add_item(tree, hf_isakmp_sa_situation, tvb, offset, 4, ENC_NA); @@ -3763,7 +3763,7 @@ dissect_id(tvbuff_t *tvb, int offset, int length, proto_tree *tree, int isakmp_v dissect_x509if_Name(FALSE, tvb, offset, &asn1_ctx, tree, hf_isakmp_id_data_cert); break; default: - proto_item_append_text(idit, "%s", tvb_bytes_to_ep_str(tvb,offset,length)); + proto_item_append_text(idit, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb,offset,length)); break; } } diff --git a/epan/dissectors/packet-isis-clv.c b/epan/dissectors/packet-isis-clv.c index a5daffec29..3a0be0aa33 100644 --- a/epan/dissectors/packet-isis-clv.c +++ b/epan/dissectors/packet-isis-clv.c @@ -142,7 +142,7 @@ isis_dissect_authentication_clv(proto_tree *tree, packet_info* pinfo, tvbuff_t * case 54: if ( length == 16 ) { proto_tree_add_bytes_format( tree, hf_auth_bytes, tvb, offset, length, - NULL, "hmac-md5 (54), password (length %d) = %s", length, tvb_bytes_to_ep_str(tvb, offset, length)); + NULL, "hmac-md5 (54), password (length %d) = %s", length, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length)); } else { proto_tree_add_bytes_format( tree, hf_auth_bytes, tvb, offset, length, NULL, "hmac-md5 (54), illegal hmac-md5 digest format (must be 16 bytes)"); diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c index d470aa0de3..a071191ffc 100644 --- a/epan/dissectors/packet-lldp.c +++ b/epan/dissectors/packet-lldp.c @@ -1198,7 +1198,7 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui break; default: - strPtr = tvb_bytes_to_ep_str(tvb, offset, (dataLen-2)); + strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-2)); proto_tree_add_item(chassis_tree, hf_chassis_id, tvb, offset, (dataLen-2), ENC_NA); break; @@ -1231,7 +1231,7 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui break; case 1: /* Chassis component */ case 3: /* Port component */ - strPtr = tvb_bytes_to_ep_str(tvb, offset, (dataLen-1)); + strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-1)); break; default: @@ -1350,7 +1350,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3 break; default: - strPtr = tvb_bytes_to_ep_str(tvb, offset, (dataLen-2)); + strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-2)); proto_tree_add_item(port_tree, hf_port_id, tvb, offset, (dataLen-2), ENC_ASCII|ENC_NA); break; @@ -1374,7 +1374,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3 switch (tlvsubType) { case 2: /* Port component */ - strPtr = tvb_bytes_to_ep_str(tvb, offset, (dataLen-1)); + strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-1)); break; case 1: /* Interface alias */ case 5: /* Interface name */ diff --git a/epan/dissectors/packet-mpls-echo.c b/epan/dissectors/packet-mpls-echo.c index 26367452fb..95efc94296 100644 --- a/epan/dissectors/packet-mpls-echo.c +++ b/epan/dissectors/packet-mpls-echo.c @@ -801,7 +801,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_p2mp_ip_tunnel_id, tvb, offset + 22, 2, ENC_BIG_ENDIAN); proto_tree_add_text(tlv_fec_tree, tvb, offset + 24, 16, "Extended Tunnel ID: 0x%s (%s)", - tvb_bytes_to_ep_str(tvb, offset + 24, 16), + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 24, 16), tvb_ip6_to_str(tvb, offset + 24)); hidden_item = proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_p2mp_ipv6_ext_tunnel_id, tvb, offset + 24, 16, ENC_NA); diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index cd930c2836..63772cf2f2 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -1607,7 +1607,7 @@ dissect_fhandle_data_LINUX_NFSD_LE(tvbuff_t* tvb, packet_info *pinfo _U_, proto_ hash_item = proto_tree_add_text(tree, tvb, offset+4, hashlen + 1, "hash path: %s", - tvb_bytes_to_ep_str(tvb, offset+5, hashlen)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+5, hashlen)); hash_tree = proto_item_add_subtree(hash_item, ett_nfs_fh_hp); proto_tree_add_uint(hash_tree, @@ -1616,7 +1616,7 @@ dissect_fhandle_data_LINUX_NFSD_LE(tvbuff_t* tvb, packet_info *pinfo _U_, proto_ proto_tree_add_text(hash_tree, tvb, offset+5, hashlen, "key: %s", - tvb_bytes_to_ep_str(tvb, offset+5, hashlen)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+5, hashlen)); } } } diff --git a/epan/dissectors/packet-nhrp.c b/epan/dissectors/packet-nhrp.c index 80f6a42eee..d28e2587dc 100644 --- a/epan/dissectors/packet-nhrp.c +++ b/epan/dissectors/packet-nhrp.c @@ -895,7 +895,7 @@ static void dissect_nhrp_ext(tvbuff_t *tvb, auth_tree = proto_tree_add_subtree_format(nhrp_tree, tvb, offset, len, ett_nhrp_auth_ext, NULL, "Extension Data: SPI=%u: Data=%s", tvb_get_ntohs(tvb, offset + 2), - tvb_bytes_to_ep_str(tvb, offset + 4, len - 4)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 4, len - 4)); proto_tree_add_item(auth_tree, hf_nhrp_auth_ext_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); proto_tree_add_item(auth_tree, hf_nhrp_auth_ext_spi, tvb, offset + 2, 2, ENC_BIG_ENDIAN); if (srcLen == 4) @@ -921,7 +921,7 @@ static void dissect_nhrp_ext(tvbuff_t *tvb, tvb_memcpy(tvb, manuf, offset, 3); vendor_tree = proto_tree_add_subtree_format(nhrp_tree, tvb, offset, len, ett_nhrp_vendor_ext, NULL, "Extension Data: Vendor ID=%s, Data=%s", get_manuf_name(manuf), - tvb_bytes_to_ep_str(tvb, offset + 3, len - 3)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 3, len - 3)); proto_tree_add_bytes_format_value(vendor_tree, hf_nhrp_vendor_ext_id, tvb, offset, 3, manuf, "%s", get_manuf_name(manuf)); if (len > 3) { diff --git a/epan/dissectors/packet-noe.c b/epan/dissectors/packet-noe.c index 7f8b498b87..353db005ef 100644 --- a/epan/dissectors/packet-noe.c +++ b/epan/dissectors/packet-noe.c @@ -1126,7 +1126,7 @@ static void decode_evt(proto_tree *tree, length, key_name, "%s (UTF-8 Value: %s, Unicode Value: 0x%" G_GINT64_MODIFIER "x)", key_name, - tvb_bytes_to_ep_str(tvb, offset, length), + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length), unicode_value); break; } diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c index 0fc5c348f1..e3ecad0722 100644 --- a/epan/dissectors/packet-ospf.c +++ b/epan/dissectors/packet-ospf.c @@ -2159,7 +2159,7 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree case OIF_TNA_NSAP_ADDRESS: stlv_tree = proto_tree_add_subtree_format(tlv_tree, tvb, stlv_offset, stlv_len+4, ett_ospf_lsa_oif_tna_stlv, NULL, "%s (NSAP): %s", stlv_name, - tvb_bytes_to_ep_str (tvb, stlv_offset + 8, stlv_len - 4)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, stlv_offset + 8, stlv_len - 4)); proto_tree_add_uint_format_value(stlv_tree, hf_ospf_tlv_type, tvb, stlv_offset, 2, stlv_type, "%u: %s (NSAP)", stlv_type, stlv_name); proto_tree_add_item(stlv_tree, hf_ospf_tlv_length, tvb, stlv_offset+2, 2, ENC_BIG_ENDIAN); diff --git a/epan/dissectors/packet-pgm.c b/epan/dissectors/packet-pgm.c index aa93c03738..df118ab622 100644 --- a/epan/dissectors/packet-pgm.c +++ b/epan/dissectors/packet-pgm.c @@ -838,7 +838,7 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pgmhdr_opts = tvb_get_guint8(tvb, 5); pgmhdr_cksum = tvb_get_ntohs(tvb, 6); - gsi = tvb_bytes_to_ep_str(tvb, 8, 6); + gsi = tvb_bytes_to_str(wmem_packet_scope(), tvb, 8, 6); pgmhdr_tsdulen = tvb_get_ntohs(tvb, 14); sqn = tvb_get_ntohl(tvb, 16); diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c index f2eca9f157..20c9bfb5fa 100644 --- a/epan/dissectors/packet-ppp.c +++ b/epan/dissectors/packet-ppp.c @@ -3829,7 +3829,7 @@ dissect_cp(tvbuff_t *tvb, int proto_id, int proto_subtree_index, proto_tree_add_bytes_format(fh_tree, hf_ppp_data, tvb, offset, length, NULL, "Rejected Packet (%d byte%s): %s", length, plurality(length, "", "s"), - tvb_bytes_to_ep_str(tvb, offset, length)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length)); } break; @@ -5294,7 +5294,7 @@ dissect_chap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_format_text(tvb, name_offset, (name_size > 20) ? 20 : name_size), (name_size > 20) ? "..." : "", - tvb_bytes_to_ep_str(tvb, value_offset, value_size)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, value_offset, value_size)); } } break; diff --git a/epan/dissectors/packet-ptpip.c b/epan/dissectors/packet-ptpip.c index a37654af63..884767c016 100644 --- a/epan/dissectors/packet-ptpip.c +++ b/epan/dissectors/packet-ptpip.c @@ -898,7 +898,7 @@ void dissect_ptpIP_guid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui { guint8 *guid; - guid = tvb_bytes_to_ep_str(tvb, *offset, PTPIP_GUID_SIZE); + guid = tvb_bytes_to_str(wmem_packet_scope(), tvb, *offset, PTPIP_GUID_SIZE); proto_tree_add_item(tree, hf_ptpIP_guid, tvb, *offset, PTPIP_GUID_SIZE, ENC_NA); *offset += PTPIP_GUID_SIZE; col_append_fstr( diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c index 4d9281b2e6..8bde81a348 100644 --- a/epan/dissectors/packet-pvfs2.c +++ b/epan/dissectors/packet-pvfs2.c @@ -1003,7 +1003,7 @@ dissect_fhandle_data_unknown(tvbuff_t *tvb, int offset, proto_tree *tree) "%s%s", first_line ? "data: " : " ", - tvb_bytes_to_ep_str(tvb,offset,sublen)); + tvb_bytes_to_str(wmem_packet_scope(), tvb,offset,sublen)); bytes_left -= sublen; offset += sublen; first_line = FALSE; diff --git a/epan/dissectors/packet-q2931.c b/epan/dissectors/packet-q2931.c index 1f87228880..39776a8e4e 100644 --- a/epan/dissectors/packet-q2931.c +++ b/epan/dissectors/packet-q2931.c @@ -1386,7 +1386,7 @@ dissect_q2931_number_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len, if (len < 20) { proto_tree_add_text(tree, tvb, offset, len, "Number (too short): %s", - tvb_bytes_to_ep_str(tvb, offset, len)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len)); return; } nsap_tree = proto_tree_add_subtree(tree, tvb, offset, len, ett_q2931_nsap, NULL, "Number"); diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index c1a12fbf5c..8a3d6b38b1 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -341,7 +341,7 @@ static const gchar *dissect_chap_password(proto_tree* tree, tvbuff_t* tvb, packe chap_tree = proto_item_add_subtree(ti, ett_chap); proto_tree_add_item(chap_tree, hf_radius_chap_ident, tvb, 0, 1, ENC_BIG_ENDIAN); proto_tree_add_item(chap_tree, hf_radius_chap_string, tvb, 1, 16, ENC_NA); - return (tvb_bytes_to_ep_str(tvb, 0, len)); + return (tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, len)); } static const gchar *dissect_framed_ip_address(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo _U_) { @@ -704,7 +704,7 @@ void radius_string(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _ void radius_octets(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) { proto_tree_add_item(tree, a->hf, tvb, offset, len, ENC_NA); - proto_item_append_text(avp_item, "%s", tvb_bytes_to_ep_str(tvb, offset, len)); + proto_item_append_text(avp_item, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len)); } void radius_ipaddr(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) { @@ -831,7 +831,7 @@ void radius_date(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_ */ void radius_abinary(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) { proto_tree_add_item(tree, a->hf, tvb, offset, len, ENC_NA); - proto_item_append_text(avp_item, "%s", tvb_bytes_to_ep_str(tvb, offset, len)); + proto_item_append_text(avp_item, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len)); } void radius_ether(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) { @@ -846,7 +846,7 @@ void radius_ether(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U void radius_ifid(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) { proto_tree_add_item(tree, a->hf, tvb, offset, len, ENC_NA); - proto_item_append_text(avp_item, "%s", tvb_bytes_to_ep_str(tvb, offset, len)); + proto_item_append_text(avp_item, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len)); } static void add_tlv_to_tree(proto_tree* tlv_tree, proto_item* tlv_item, packet_info* pinfo, tvbuff_t* tvb, radius_attr_info_t* dictionary_entry, guint32 tlv_length, guint32 offset) { diff --git a/epan/dissectors/packet-rmt-lct.c b/epan/dissectors/packet-rmt-lct.c index 6f80689351..f2223d36aa 100644 --- a/epan/dissectors/packet-rmt-lct.c +++ b/epan/dissectors/packet-rmt-lct.c @@ -455,7 +455,7 @@ dissect_lct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) if (toi_size <= 8) col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TOI: %" G_GINT64_MODIFIER "u", toi); else - col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TOI: 0x%s", tvb_bytes_to_ep_str(tvb, offset, toi_size)); + col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TOI: 0x%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, toi_size)); offset += toi_size; } diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index 4733ecb530..ebbdbd00dc 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -5866,7 +5866,7 @@ dissect_rsvp_call_id(proto_tree *ti, proto_tree *rsvp_object_tree, case 0x7F: offset4 = offset3 + len; - str = tvb_bytes_to_ep_str(tvb, offset3, len); + str = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset3, len); proto_tree_add_item(rsvp_object_tree, hf_rsvp_callid_srcaddr_bytes, tvb, offset3, len, ENC_NA); break; @@ -5880,7 +5880,7 @@ dissect_rsvp_call_id(proto_tree *ti, proto_tree *rsvp_object_tree, proto_item_append_text(ti, "Src: %s. ", str); proto_tree_add_item(rsvp_object_tree, hf_rsvp_call_id_local_identifier, tvb, offset4, 8, ENC_NA); - proto_item_append_text(ti, "Local ID: %s. ", tvb_bytes_to_ep_str(tvb, offset4, 8)); + proto_item_append_text(ti, "Local ID: %s. ", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset4, 8)); break; default: diff --git a/epan/dissectors/packet-simulcrypt.c b/epan/dissectors/packet-simulcrypt.c index 86d715864a..9c806cefdc 100644 --- a/epan/dissectors/packet-simulcrypt.c +++ b/epan/dissectors/packet-simulcrypt.c @@ -1318,7 +1318,7 @@ dissect_simulcrypt_data(proto_tree *simulcrypt_tree, proto_item *simulcrypt_item /* Parameter Length 2 Bytes */ plen = tvb_get_ntohs(tvb, offset+2); /* read 2 byte length value */ /* Parameter Value plen Bytes */ - pvalue_char = tvb_bytes_to_ep_str(tvb, offset+4, plen); + pvalue_char = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+4, plen); simulcrypt_item = proto_tree_add_item(simulcrypt_tree, hf_simulcrypt_parameter, tvb, offset, plen+2+2, ENC_NA ); diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c index 18624d5df7..2afe9c7712 100644 --- a/epan/dissectors/packet-smb-pipe.c +++ b/epan/dissectors/packet-smb-pipe.c @@ -621,7 +621,7 @@ add_logon_hours(tvbuff_t *tvb, int offset, int count, packet_info *pinfo _U_, proto_tree_add_bytes_format_value(tree, hf_index, tvb, cptr, count, NULL, "%s (wrong length, should be 21, is %d", - tvb_bytes_to_ep_str(tvb, cptr, count), count); + tvb_bytes_to_str(wmem_packet_scope(), tvb, cptr, count), count); } } else { proto_tree_add_bytes_format_value(tree, hf_index, tvb, 0, 0, @@ -1702,7 +1702,7 @@ dissect_request_parameters(tvbuff_t *tvb, int offset, packet_info *pinfo, "%s: Value is %s, type is wrong (b)", proto_registrar_get_name((*items->hf_index == -1) ? hf_smb_pipe_bytes_param : *items->hf_index), - tvb_bytes_to_ep_str(tvb, offset, count)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, count)); offset += count; items++; } else { @@ -1855,7 +1855,7 @@ dissect_response_parameters(tvbuff_t *tvb, int offset, packet_info *pinfo, "%s: Value is %s, type is wrong (g)", proto_registrar_get_name((*items->hf_index == -1) ? hf_smb_pipe_bytes_param : *items->hf_index), - tvb_bytes_to_ep_str(tvb, offset, count)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, count)); offset += count; items++; } else { @@ -2052,7 +2052,7 @@ dissect_transact_data(tvbuff_t *tvb, int offset, int convert, "%s: Value is %s, type is wrong (B)", proto_registrar_get_name((*items->hf_index == -1) ? hf_smb_pipe_bytes_param : *items->hf_index), - tvb_bytes_to_ep_str(tvb, offset, count)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, count)); offset += count; items++; } else { @@ -2144,7 +2144,7 @@ dissect_transact_data(tvbuff_t *tvb, int offset, int convert, "%s: Value is %s, type is wrong (b)", proto_registrar_get_name((*items->hf_index == -1) ? hf_smb_pipe_bytes_param : *items->hf_index), - tvb_bytes_to_ep_str(tvb, cptr, count)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, cptr, count)); items++; } else { offset = (*items->func)(tvb, offset, count, diff --git a/epan/dissectors/packet-smpp.c b/epan/dissectors/packet-smpp.c index cec2921cda..5e43e5395a 100644 --- a/epan/dissectors/packet-smpp.c +++ b/epan/dissectors/packet-smpp.c @@ -1778,7 +1778,7 @@ smpp_handle_tlv(proto_tree *tree, tvbuff_t *tvb, int *offset) *offset, length, ENC_NA); } - proto_item_append_text(sub_tree,": %s", tvb_bytes_to_ep_str(tvb,*offset,length)); + proto_item_append_text(sub_tree,": %s", tvb_bytes_to_str(wmem_packet_scope(), tvb,*offset,length)); (*offset) += length; break; } diff --git a/epan/dissectors/packet-t38.c b/epan/dissectors/packet-t38.c index a02d1ed787..1764eb4022 100644 --- a/epan/dissectors/packet-t38.c +++ b/epan/dissectors/packet-t38.c @@ -684,11 +684,11 @@ dissect_t38_T_field_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ if (primary_part){ if(value_len < 8){ col_append_fstr(actx->pinfo->cinfo, COL_INFO, "[%s]", - tvb_bytes_to_ep_str(value_tvb,0,value_len)); + tvb_bytes_to_str(wmem_packet_scope(), value_tvb,0,value_len)); } else { col_append_fstr(actx->pinfo->cinfo, COL_INFO, "[%s...]", - tvb_bytes_to_ep_str(value_tvb,0,7)); + tvb_bytes_to_str(wmem_packet_scope(), value_tvb,0,7)); } } diff --git a/epan/dissectors/packet-ubertooth.c b/epan/dissectors/packet-ubertooth.c index b2ad67506b..4eef348ac0 100644 --- a/epan/dissectors/packet-ubertooth.c +++ b/epan/dissectors/packet-ubertooth.c @@ -1622,7 +1622,7 @@ dissect_ubertooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 51: /* Set AFH Map */ proto_tree_add_item(main_tree, hf_afh_map, tvb, offset, 10, ENC_NA); - col_append_fstr(pinfo->cinfo, COL_INFO, " - %s", tvb_bytes_to_ep_str(tvb, offset, 10)); + col_append_fstr(pinfo->cinfo, COL_INFO, " - %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 10)); offset += 10; break; diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index f838a29521..c6f13298d7 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -2138,7 +2138,7 @@ dissect_usb_setup_get_descriptor_response(packet_info *pinfo, proto_tree *tree, proto_tree_add_bytes_format(tree, hf_usb_get_descriptor_resp_generic, tvb, offset, len, NULL, "GET DESCRIPTOR Response data (unknown descriptor type %u): %s", usb_trans_info->u.get_descriptor.type, - tvb_bytes_to_ep_str(tvb, offset, len)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len)); offset = offset + len; } break; diff --git a/epan/dissectors/packet-vuze-dht.c b/epan/dissectors/packet-vuze-dht.c index 3e2ad8c9a1..885fcb61be 100644 --- a/epan/dissectors/packet-vuze-dht.c +++ b/epan/dissectors/packet-vuze-dht.c @@ -388,7 +388,7 @@ dissect_vuze_dht_key(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, int offset += TL_BYTE; proto_tree_add_item( sub_tree, hf_vuze_dht_key_data, tvb, offset, key_len, ENC_NA ); - proto_item_append_text( ti, ": %d bytes ( %s )", key_len, tvb_bytes_to_ep_str(tvb, offset, key_len ) ); + proto_item_append_text( ti, ": %d bytes ( %s )", key_len, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, key_len ) ); offset += key_len; return offset; @@ -474,7 +474,7 @@ dissect_vuze_dht_value(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, i offset += TL_SHORT; proto_tree_add_item(sub_tree, hf_vuze_dht_value_bytes, tvb, offset, value_bytes_count, ENC_NA); - proto_item_append_text( ti, ": %d bytes ( %s )", value_bytes_count, tvb_bytes_to_ep_str(tvb, offset, value_bytes_count ) ); + proto_item_append_text( ti, ": %d bytes ( %s )", value_bytes_count, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, value_bytes_count ) ); offset += value_bytes_count; offset = dissect_vuze_dht_contact( tvb, pinfo, sub_tree, offset ); @@ -553,7 +553,7 @@ dissect_vuze_dht_network_coordinate(tvbuff_t *tvb, packet_info _U_*pinfo, proto_ sub_tree = proto_item_add_subtree(ti, ett_vuze_dht_network_coordinate); proto_item_append_text( ti, ": type %d, length %d ( %s )", - tvb_get_guint8(tvb,offset), tvb_get_guint8(tvb,offset+TL_BYTE), tvb_bytes_to_ep_str(tvb, offset+TL_BYTE+TL_BYTE, coordinate_size ) ); + tvb_get_guint8(tvb,offset), tvb_get_guint8(tvb,offset+TL_BYTE), tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+TL_BYTE+TL_BYTE, coordinate_size ) ); proto_tree_add_item( sub_tree, hf_vuze_dht_network_coordinate_type, tvb, offset, TL_BYTE, ENC_BIG_ENDIAN ); offset += TL_BYTE; diff --git a/epan/dissectors/packet-wccp.c b/epan/dissectors/packet-wccp.c index 9c37e72b3a..6986dfb3ce 100644 --- a/epan/dissectors/packet-wccp.c +++ b/epan/dissectors/packet-wccp.c @@ -2336,8 +2336,7 @@ dissect_wccp2_capability_element(tvbuff_t *tvb, int offset, gint length, proto_tree_add_text(element_tree, tvb, offset, capability_val_len, "Value: %s", - tvb_bytes_to_ep_str(tvb, offset, - capability_val_len)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, capability_val_len)); break; } return length - 4 - capability_val_len; diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c index e8f6d3bf70..5abcca15b6 100644 --- a/epan/dissectors/packet-x11.c +++ b/epan/dissectors/packet-x11.c @@ -2363,7 +2363,7 @@ static void listOfTextItem(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf, tti = proto_tree_add_none_format(tt, hf_x11_textitem_string, tvb, *offsetp, l*2 + 2, "textitem (string): delta = %d, %s", delta, - tvb_bytes_to_ep_str(tvb, *offsetp + 2, l*2)); + tvb_bytes_to_str(wmem_packet_scope(), tvb, *offsetp + 2, l*2)); ttt = proto_item_add_subtree(tti, ett_x11_text_item); proto_tree_add_item(ttt, hf_x11_textitem_string_delta, tvb, *offsetp + 1, 1, byte_order); proto_tree_add_item(ttt, hf_x11_textitem_string_string16_bytes, tvb, *offsetp + 2, l*2, byte_order); diff --git a/epan/tvbuff.c b/epan/tvbuff.c index 2d9682034c..95e7548608 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -3482,16 +3482,7 @@ tvb_bcd_dig_to_wmem_packet_str(tvbuff_t *tvb, const gint offset, const gint len, * Format a bunch of data from a tvbuff as bytes, returning a pointer * to the string with the formatted data. */ -gchar * -tvb_bytes_to_ep_str(tvbuff_t *tvb, const gint offset, const gint len) -{ - return bytes_to_ep_str(ensure_contiguous(tvb, offset, len), len); -} - -/* - * Same as tvb_bytes_to_ep_str but with wmem - */ -gchar *tvb_bytes_to_wmem_str(wmem_allocator_t *allocator, tvbuff_t *tvb, +gchar *tvb_bytes_to_str(wmem_allocator_t *allocator, tvbuff_t *tvb, const gint offset, const gint len) { return bytes_to_str(allocator, ensure_contiguous(tvb, offset, len), len); diff --git a/epan/tvbuff.h b/epan/tvbuff.h index 5f08414e36..4a72b542a3 100644 --- a/epan/tvbuff.h +++ b/epan/tvbuff.h @@ -850,13 +850,7 @@ WS_DLL_PUBLIC gchar *tvb_bytes_to_str_punct(wmem_allocator_t *scope, tvbuff_t *t * Format a bunch of data from a tvbuff as bytes, returning a pointer * to the string with the formatted data. */ -WS_DLL_PUBLIC gchar *tvb_bytes_to_ep_str(tvbuff_t *tvb, const gint offset, - const gint len); - -/** - * Same as above, but using wmem memory management - */ -WS_DLL_PUBLIC gchar *tvb_bytes_to_wmem_str(wmem_allocator_t *allocator, tvbuff_t *tvb, +WS_DLL_PUBLIC gchar *tvb_bytes_to_str(wmem_allocator_t *allocator, tvbuff_t *tvb, const gint offset, const gint len); /** diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c index 489690ad6c..a585519e99 100644 --- a/epan/wslua/wslua_tvb.c +++ b/epan/wslua/wslua_tvb.c @@ -502,7 +502,7 @@ WSLUA_METAMETHOD Tvb__tostring(lua_State* L) { will be appended if the string is too long. */ Tvb tvb = checkTvb(L,1); int len = tvb_captured_length(tvb->ws_tvb); - char* str = tvb_bytes_to_wmem_str(NULL,tvb->ws_tvb,0,len); + char* str = tvb_bytes_to_str(NULL,tvb->ws_tvb,0,len); lua_pushfstring(L, "TVB(%d) : %s", len, str); @@ -1566,7 +1566,7 @@ WSLUA_METAMETHOD TvbRange__tostring(lua_State* L) { return 0; } - str = tvb_bytes_to_wmem_str(NULL,tvbr->tvb->ws_tvb,tvbr->offset,tvbr->len); + str = tvb_bytes_to_str(NULL,tvbr->tvb->ws_tvb,tvbr->offset,tvbr->len); lua_pushstring(L,str); wmem_free(NULL, str); diff --git a/tools/convert_proto_tree_add_text.pl b/tools/convert_proto_tree_add_text.pl index d811d12016..6acaf3f971 100755 --- a/tools/convert_proto_tree_add_text.pl +++ b/tools/convert_proto_tree_add_text.pl @@ -491,8 +491,7 @@ sub generate_hfs { } elsif (($args[5] =~ /tvb_get_ephemeral_string/) || ($args[5] =~ /tvb_format_text/)){ $proto_tree_item[9] = "FT_STRING"; - } elsif (($args[5] =~ /tvb_bytes_to_str/) || - ($args[5] =~ /tvb_bytes_to_ep_str/)) { + } elsif (($args[5] =~ /tvb_bytes_to_str/)) { $proto_tree_item[9] = "FT_BYTES"; } elsif ($args[5] =~ /tvb_ether_to_str/) { $proto_tree_item[9] = "FT_ETHER";