aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2021-08-27 14:56:00 -0400
committerAndersBroman <a.broman58@gmail.com>2021-09-01 03:54:52 +0000
commitcdfab0d6e991df2fd3591ef896ba36937a8d4dfc (patch)
tree180c49932c562eb644c5f24d6c8d8cbf13a936e3 /epan
parent61e66c37abb1b7f59726e4407ac8dd53e6b75cac (diff)
tvbuff: convert helper methods to pinfo->pool
A few of them just needed scratch memory, so allocate and free it manually after doing any exception-raising checks. A few others were returning memory, and needed conversion to accept a wmem scope argument.
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/asn1/lte-rrc/lte-rrc.cnf2
-rw-r--r--epan/dissectors/asn1/nr-rrc/nr-rrc.cnf2
-rw-r--r--epan/dissectors/asn1/p1/p1.cnf10
-rw-r--r--epan/dissectors/asn1/p1/packet-p1-template.c6
-rw-r--r--epan/dissectors/asn1/rtse/rtse.cnf4
-rw-r--r--epan/dissectors/asn1/s1ap/s1ap.cnf4
-rw-r--r--epan/dissectors/asn1/ulp/ulp.cnf2
-rw-r--r--epan/dissectors/asn1/x509if/x509if.cnf2
-rw-r--r--epan/dissectors/packet-adb.c2
-rw-r--r--epan/dissectors/packet-afp.c6
-rw-r--r--epan/dissectors/packet-afs.c2
-rw-r--r--epan/dissectors/packet-aim.c2
-rw-r--r--epan/dissectors/packet-ajp13.c2
-rw-r--r--epan/dissectors/packet-amqp.c2
-rw-r--r--epan/dissectors/packet-ansi_a.c8
-rw-r--r--epan/dissectors/packet-aprs.c36
-rw-r--r--epan/dissectors/packet-asap.c2
-rw-r--r--epan/dissectors/packet-ax25-nol3.c4
-rw-r--r--epan/dissectors/packet-beep.c4
-rw-r--r--epan/dissectors/packet-bencode.c4
-rw-r--r--epan/dissectors/packet-bthci_cmd.c4
-rw-r--r--epan/dissectors/packet-bthfp.c2
-rw-r--r--epan/dissectors/packet-bthsp.c2
-rw-r--r--epan/dissectors/packet-btrfcomm.c6
-rw-r--r--epan/dissectors/packet-cdp.c44
-rw-r--r--epan/dissectors/packet-cimd.c2
-rw-r--r--epan/dissectors/packet-cip.c8
-rw-r--r--epan/dissectors/packet-daap.c2
-rw-r--r--epan/dissectors/packet-dcm.c6
-rw-r--r--epan/dissectors/packet-dhcp.c18
-rw-r--r--epan/dissectors/packet-dhcpv6.c4
-rw-r--r--epan/dissectors/packet-dns.c2
-rw-r--r--epan/dissectors/packet-dpnss.c6
-rw-r--r--epan/dissectors/packet-dtp.c2
-rw-r--r--epan/dissectors/packet-dua.c4
-rw-r--r--epan/dissectors/packet-enip.c4
-rw-r--r--epan/dissectors/packet-enrp.c2
-rw-r--r--epan/dissectors/packet-f5ethtrailer.c4
-rw-r--r--epan/dissectors/packet-fefd.c8
-rw-r--r--epan/dissectors/packet-gdsdb.c6
-rw-r--r--epan/dissectors/packet-gsm_a_common.c4
-rw-r--r--epan/dissectors/packet-gsm_r_uus1.c4
-rw-r--r--epan/dissectors/packet-hislip.c2
-rw-r--r--epan/dissectors/packet-http.c2
-rw-r--r--epan/dissectors/packet-iax2.c4
-rw-r--r--epan/dissectors/packet-ieee80211.c2
-rw-r--r--epan/dissectors/packet-imap.c4
-rw-r--r--epan/dissectors/packet-imf.c2
-rw-r--r--epan/dissectors/packet-ipp.c22
-rw-r--r--epan/dissectors/packet-isis-clv.c2
-rw-r--r--epan/dissectors/packet-ismp.c2
-rw-r--r--epan/dissectors/packet-iua.c4
-rw-r--r--epan/dissectors/packet-jxta.c6
-rw-r--r--epan/dissectors/packet-kismet.c2
-rw-r--r--epan/dissectors/packet-l1-events.c2
-rw-r--r--epan/dissectors/packet-ldss.c2
-rw-r--r--epan/dissectors/packet-lldp.c20
-rw-r--r--epan/dissectors/packet-lmp.c8
-rw-r--r--epan/dissectors/packet-log3gpp.c4
-rw-r--r--epan/dissectors/packet-lte-rrc.c2
-rw-r--r--epan/dissectors/packet-m2ua.c4
-rw-r--r--epan/dissectors/packet-m3ua.c2
-rw-r--r--epan/dissectors/packet-megaco.c88
-rw-r--r--epan/dissectors/packet-mgcp.c14
-rw-r--r--epan/dissectors/packet-msrp.c16
-rw-r--r--epan/dissectors/packet-multipart.c2
-rw-r--r--epan/dissectors/packet-mysql.c8
-rw-r--r--epan/dissectors/packet-nas_5gs.c2
-rw-r--r--epan/dissectors/packet-netflow.c22
-rw-r--r--epan/dissectors/packet-nntp.c2
-rw-r--r--epan/dissectors/packet-nr-rrc.c2
-rw-r--r--epan/dissectors/packet-p1.c16
-rw-r--r--epan/dissectors/packet-pop.c4
-rw-r--r--epan/dissectors/packet-ppi-antenna.c4
-rw-r--r--epan/dissectors/packet-ppi-gps.c2
-rw-r--r--epan/dissectors/packet-ppi-sensor.c2
-rw-r--r--epan/dissectors/packet-ppi-vector.c2
-rw-r--r--epan/dissectors/packet-ppp.c12
-rw-r--r--epan/dissectors/packet-q931.c4
-rw-r--r--epan/dissectors/packet-radius.c2
-rw-r--r--epan/dissectors/packet-rlogin.c4
-rw-r--r--epan/dissectors/packet-rsip.c2
-rw-r--r--epan/dissectors/packet-rsvp.c4
-rw-r--r--epan/dissectors/packet-rtpproxy.c8
-rw-r--r--epan/dissectors/packet-rtse.c4
-rw-r--r--epan/dissectors/packet-rtsp.c16
-rw-r--r--epan/dissectors/packet-s1ap.c4
-rw-r--r--epan/dissectors/packet-s7comm.c2
-rw-r--r--epan/dissectors/packet-sctp.c2
-rw-r--r--epan/dissectors/packet-sebek.c4
-rw-r--r--epan/dissectors/packet-selfm.c2
-rw-r--r--epan/dissectors/packet-sip.c16
-rw-r--r--epan/dissectors/packet-skinny.c10
-rw-r--r--epan/dissectors/packet-smb-pipe.c6
-rw-r--r--epan/dissectors/packet-smb.c2
-rw-r--r--epan/dissectors/packet-smtp.c20
-rw-r--r--epan/dissectors/packet-ssh.c2
-rw-r--r--epan/dissectors/packet-sua.c4
-rw-r--r--epan/dissectors/packet-syslog.c2
-rw-r--r--epan/dissectors/packet-systemd-journal.c10
-rw-r--r--epan/dissectors/packet-tapa.c4
-rw-r--r--epan/dissectors/packet-telnet.c4
-rw-r--r--epan/dissectors/packet-tftp.c18
-rw-r--r--epan/dissectors/packet-tsdns.c2
-rw-r--r--epan/dissectors/packet-ua3g.c2
-rw-r--r--epan/dissectors/packet-udld.c8
-rw-r--r--epan/dissectors/packet-ulp.c2
-rw-r--r--epan/dissectors/packet-vnc.c4
-rw-r--r--epan/dissectors/packet-vpp.c2
-rw-r--r--epan/dissectors/packet-vxi11.c4
-rw-r--r--epan/dissectors/packet-wbxml.c28
-rw-r--r--epan/dissectors/packet-wsp.c4
-rw-r--r--epan/dissectors/packet-x509if.c2
-rw-r--r--epan/dissectors/packet-xml.c10
-rw-r--r--epan/dissectors/packet-ymsg.c4
-rw-r--r--epan/dissectors/packet-zvt.c16
-rw-r--r--epan/proto.c2
-rw-r--r--epan/tvbuff.c34
-rw-r--r--epan/tvbuff.h22
119 files changed, 428 insertions, 420 deletions
diff --git a/epan/dissectors/asn1/lte-rrc/lte-rrc.cnf b/epan/dissectors/asn1/lte-rrc/lte-rrc.cnf
index da93846e50..7fc85d3bdb 100644
--- a/epan/dissectors/asn1/lte-rrc/lte-rrc.cnf
+++ b/epan/dissectors/asn1/lte-rrc/lte-rrc.cnf
@@ -1493,7 +1493,7 @@ LogMeasResultBT-r15/rssi-BT-r15 DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units
const gchar *str, *hf_str;
proto_tree *subtree;
subtree = proto_item_add_subtree(actx->created_item, ett_lte_rrc_absTimeInfo);
- str = tvb_bcd_dig_to_wmem_packet_str(abs_time_info_tvb, 0, 6, NULL, FALSE);
+ str = tvb_bcd_dig_to_str(actx->pinfo->pool, abs_time_info_tvb, 0, 6, NULL, FALSE);
hf_str = wmem_strdup_printf(actx->pinfo->pool, "%c%c-%c%c-%c%c %c%c:%c%c:%c%c", str[0], str[1],
str[2], str[3], str[4], str[5], str[6], str[7], str[8], str[9], str[10], str[11]);
proto_tree_add_string(subtree, hf_lte_rrc_absolute_time, abs_time_info_tvb, 0, 6, hf_str);
diff --git a/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf b/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf
index 05091f6d55..cf99fcac7c 100644
--- a/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf
+++ b/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf
@@ -1661,7 +1661,7 @@ T-Reselection DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_seconds
const gchar *str, *hf_str;
proto_tree *subtree;
subtree = proto_item_add_subtree(actx->created_item, ett_nr_rrc_absTimeInfo);
- str = tvb_bcd_dig_to_wmem_packet_str(abs_time_info_tvb, 0, 6, NULL, FALSE);
+ str = tvb_bcd_dig_to_str(actx->pinfo->pool, abs_time_info_tvb, 0, 6, NULL, FALSE);
hf_str = wmem_strdup_printf(actx->pinfo->pool, "%c%c-%c%c-%c%c %c%c:%c%c:%c%c", str[0], str[1],
str[2], str[3], str[4], str[5], str[6], str[7], str[8], str[9], str[10], str[11]);
proto_tree_add_string(subtree, hf_nr_rrc_absolute_time, abs_time_info_tvb, 0, 6, hf_str);
diff --git a/epan/dissectors/asn1/p1/p1.cnf b/epan/dissectors/asn1/p1/p1.cnf
index 45d89e7de7..4da5be4c53 100644
--- a/epan/dissectors/asn1/p1/p1.cnf
+++ b/epan/dissectors/asn1/p1/p1.cnf
@@ -722,10 +722,10 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
%(DEFAULT_BODY)s
if (ctx && ctx->do_address) {
- proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(mtaname, 0, tvb_reported_length(mtaname)));
+ proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(actx->pinfo->pool, mtaname, 0, tvb_reported_length(mtaname)));
} else {
if (mtaname) {
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(mtaname, 0, tvb_reported_length(mtaname)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(actx->pinfo->pool, mtaname, 0, tvb_reported_length(mtaname)));
}
}
@@ -1079,10 +1079,10 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
if(id) {
if (ctx && ctx->do_address)
- proto_item_append_text(actx->subtree.tree, " $ %%s)", tvb_format_text(id, 0, tvb_reported_length(id)));
+ proto_item_append_text(actx->subtree.tree, " $ %%s)", tvb_format_text(actx->pinfo->pool, id, 0, tvb_reported_length(id)));
if (hf_index == hf_p1_subject_identifier)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %%s)", tvb_format_text(id, 0, tvb_reported_length(id)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %%s)", tvb_format_text(actx->pinfo->pool, id, 0, tvb_reported_length(id)));
}
#.FN_BODY MTSIdentifier
@@ -1151,7 +1151,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
%(DEFAULT_BODY)s
if(arrival && ctx && ctx->do_address)
- proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(arrival, 0, tvb_reported_length(arrival)));
+ proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(actx->pinfo->pool, arrival, 0, tvb_reported_length(arrival)));
#.FN_PARS RoutingAction
VAL_PTR = &action
diff --git a/epan/dissectors/asn1/p1/packet-p1-template.c b/epan/dissectors/asn1/p1/packet-p1-template.c
index b8bf0c4801..b4b3b77e42 100644
--- a/epan/dissectors/asn1/p1/packet-p1-template.c
+++ b/epan/dissectors/asn1/p1/packet-p1-template.c
@@ -115,7 +115,7 @@ static void do_address(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx)
wmem_strbuf_append(ctx->oraddress, addr);
}
if (tvb_string) {
- wmem_strbuf_append(ctx->oraddress, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string)));
+ wmem_strbuf_append(ctx->oraddress, tvb_format_text(actx->pinfo->pool, tvb_string, 0, tvb_captured_length(tvb_string)));
}
}
}
@@ -128,7 +128,7 @@ static void do_address_str(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* a
do_address(addr, tvb_string, actx);
if (ctx && ctx->do_address && ddatype && tvb_string)
- wmem_strbuf_append(ddatype, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string)));
+ wmem_strbuf_append(ddatype, tvb_format_text(actx->pinfo->pool, tvb_string, 0, tvb_captured_length(tvb_string)));
}
static void do_address_str_tree(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx, proto_tree* tree)
@@ -140,7 +140,7 @@ static void do_address_str_tree(const char* addr, tvbuff_t* tvb_string, asn1_ctx
if (ctx && ctx->do_address && tvb_string && ddatype) {
if (wmem_strbuf_get_len(ddatype) > 0) {
- proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string)));
+ proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(actx->pinfo->pool, tvb_string, 0, tvb_captured_length(tvb_string)));
}
}
}
diff --git a/epan/dissectors/asn1/rtse/rtse.cnf b/epan/dissectors/asn1/rtse/rtse.cnf
index ea39247005..bfaff0346b 100644
--- a/epan/dissectors/asn1/rtse/rtse.cnf
+++ b/epan/dissectors/asn1/rtse/rtse.cnf
@@ -128,7 +128,7 @@ CallingSSuserReference/t61String DISPLAY = STR_UNICODE
tvbuff_t *string = NULL;
%(DEFAULT_BODY)s
if(open_request && string)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_reported_length(string)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(actx->pinfo->pool, string, 0, tvb_reported_length(string)));
#.END
@@ -136,7 +136,7 @@ CallingSSuserReference/t61String DISPLAY = STR_UNICODE
tvbuff_t *string = NULL;
%(DEFAULT_BODY)s
if(open_request && string)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_reported_length(string)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(actx->pinfo->pool, string, 0, tvb_reported_length(string)));
#.FN_BODY RTTPapdu VAL_PTR=&priority
int priority = -1;
diff --git a/epan/dissectors/asn1/s1ap/s1ap.cnf b/epan/dissectors/asn1/s1ap/s1ap.cnf
index 7ff22a9418..80bb2291a4 100644
--- a/epan/dissectors/asn1/s1ap/s1ap.cnf
+++ b/epan/dissectors/asn1/s1ap/s1ap.cnf
@@ -280,7 +280,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
is_ascii = tvb_ascii_isprint(parameter_tvb, 0, length);
if (is_ascii)
- proto_item_append_text(actx->created_item," (%%s)",tvb_format_text(parameter_tvb, 0, length));
+ proto_item_append_text(actx->created_item," (%%s)",tvb_format_text(actx->pinfo->pool, parameter_tvb, 0, length));
#.FN_BODY MMEname VAL_PTR = parameter_tvb
tvbuff_t *parameter_tvb=NULL;
@@ -296,7 +296,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
is_ascii = tvb_ascii_isprint(parameter_tvb, 0, length);
if (is_ascii)
- proto_item_append_text(actx->created_item," (%%s)",tvb_format_text(parameter_tvb, 0, length));
+ proto_item_append_text(actx->created_item," (%%s)",tvb_format_text(actx->pinfo->pool, parameter_tvb, 0, length));
#.END
diff --git a/epan/dissectors/asn1/ulp/ulp.cnf b/epan/dissectors/asn1/ulp/ulp.cnf
index b66cee1076..2f23a50ccb 100644
--- a/epan/dissectors/asn1/ulp/ulp.cnf
+++ b/epan/dissectors/asn1/ulp/ulp.cnf
@@ -712,7 +712,7 @@ SET-GANSSReferenceTime/ganss-TODUncertainty ulp_UTRAN_gpsReferenceTimeUncertaint
proto_tree *subtree;
subtree = proto_item_add_subtree(actx->created_item, ett_ulp_thirdPartyId);
- proto_tree_add_string(subtree, hf_ulp_mobile_directory_number, mdn_tvb, 0, 8, tvb_bcd_dig_to_wmem_packet_str(mdn_tvb, 0, 8, NULL, FALSE));
+ proto_tree_add_string(subtree, hf_ulp_mobile_directory_number, mdn_tvb, 0, 8, tvb_bcd_dig_to_str(actx->pinfo->pool, mdn_tvb, 0, 8, NULL, FALSE));
}
#.FN_BODY ThirdPartyID/uri
diff --git a/epan/dissectors/asn1/x509if/x509if.cnf b/epan/dissectors/asn1/x509if/x509if.cnf
index 77475cbfe7..025d0211a7 100644
--- a/epan/dissectors/asn1/x509if/x509if.cnf
+++ b/epan/dissectors/asn1/x509if/x509if.cnf
@@ -242,7 +242,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember"
if(out_tvb) {
/* it was a string - format it */
- value = tvb_format_text(out_tvb, 0, tvb_reported_length(out_tvb));
+ value = tvb_format_text(actx->pinfo->pool, out_tvb, 0, tvb_reported_length(out_tvb));
if(last_rdn) {
(void) g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
diff --git a/epan/dissectors/packet-adb.c b/epan/dissectors/packet-adb.c
index ad91888aa7..e4415175a3 100644
--- a/epan/dissectors/packet-adb.c
+++ b/epan/dissectors/packet-adb.c
@@ -738,7 +738,7 @@ dissect_adb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
gchar *data_str;
data_item = proto_tree_add_item(main_tree, hf_data, tvb, offset, data_length, ENC_NA);
- data_str = tvb_format_text(tvb, offset, data_length);
+ data_str = tvb_format_text(pinfo->pool, tvb, offset, data_length);
proto_item_append_text(data_item, ": %s", data_str);
col_append_fstr(pinfo->cinfo, COL_INFO, " Raw: %s", data_str);
}
diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c
index 9861cf1ff5..08a01afc38 100644
--- a/epan/dissectors/packet-afp.c
+++ b/epan/dissectors/packet-afp.c
@@ -1922,12 +1922,12 @@ get_name(tvbuff_t *tvb, int offset, int type)
case 2:
len = tvb_get_guint8(tvb, offset);
offset++;
- string = tvb_format_text(tvb,offset, len);
+ string = tvb_format_text(wmem_packet_scope(), tvb,offset, len);
break;
case 3:
len = tvb_get_ntohs(tvb, offset +4);
offset += 6;
- string = tvb_format_text(tvb,offset, len);
+ string = tvb_format_text(wmem_packet_scope(), tvb,offset, len);
break;
default:
string = "Unknown type";
@@ -3812,7 +3812,7 @@ decode_attr_name (proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, gint
gchar *name;
proto_tree *sub_tree;
- name = tvb_format_text(tvb,offset+2, len);
+ name = tvb_format_text(pinfo->pool, tvb,offset+2, len);
sub_tree = proto_tree_add_subtree_format(tree, tvb, offset, len + 2,
ett_afp_extattr_names, NULL, label, name);
diff --git a/epan/dissectors/packet-afs.c b/epan/dissectors/packet-afs.c
index 82c1051a2d..a1c593107a 100644
--- a/epan/dissectors/packet-afs.c
+++ b/epan/dissectors/packet-afs.c
@@ -1462,7 +1462,7 @@ afs_hash (gconstpointer v)
*
* Should this just scan the string itself, rather than using "sscanf()"?
*/
-#define GETSTR (tvb_format_text(tvb,ptvcursor_current_offset(cursor),tvb_captured_length_remaining(tvb,ptvcursor_current_offset(cursor))))
+#define GETSTR (tvb_format_text(wmem_packet_scope(),tvb,ptvcursor_current_offset(cursor),tvb_captured_length_remaining(tvb,ptvcursor_current_offset(cursor))))
static void
dissect_acl(ptvcursor_t *cursor, struct rxinfo *rxinfo _U_)
diff --git a/epan/dissectors/packet-aim.c b/epan/dissectors/packet-aim.c
index 5a069b9d39..ef9236a17f 100644
--- a/epan/dissectors/packet-aim.c
+++ b/epan/dissectors/packet-aim.c
@@ -853,7 +853,7 @@ dissect_aim_buddyname(tvbuff_t *tvb, packet_info *pinfo _U_, int offset,
{
buddy_tree = proto_tree_add_subtree_format(tree, tvb, offset-1, 1+buddyname_length,
ett_aim_buddyname, NULL, "Buddy: %s",
- tvb_format_text(tvb, offset, buddyname_length));
+ tvb_format_text(pinfo->pool, tvb, offset, buddyname_length));
proto_tree_add_item(buddy_tree, hf_aim_buddyname_len, tvb, offset-1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(buddy_tree, hf_aim_buddyname, tvb, offset, buddyname_length, ENC_UTF_8|ENC_NA);
}
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c
index 9be107ffdf..86ef01af20 100644
--- a/epan/dissectors/packet-ajp13.c
+++ b/epan/dissectors/packet-ajp13.c
@@ -308,7 +308,7 @@ ajp13_get_nstring(tvbuff_t *tvb, gint offset, guint16* ret_len)
if (len == 0xFFFF)
len = 0;
- return tvb_format_text(tvb, offset+2, MIN(len, ITEM_LABEL_LENGTH));
+ return tvb_format_text(wmem_packet_scope(), tvb, offset+2, MIN(len, ITEM_LABEL_LENGTH));
}
diff --git a/epan/dissectors/packet-amqp.c b/epan/dissectors/packet-amqp.c
index 82f8d33421..e87385f600 100644
--- a/epan/dissectors/packet-amqp.c
+++ b/epan/dissectors/packet-amqp.c
@@ -10601,7 +10601,7 @@ format_amqp_0_10_char(tvbuff_t *tvb,
guint offset, guint length _U_,
const char **value)
{
- *value = tvb_format_text(tvb, offset, 1);
+ *value = tvb_format_text(wmem_packet_scope(), tvb, offset, 1);
return 1;
}
diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c
index fa3cfdc304..904a85b9f7 100644
--- a/epan/dissectors/packet-ansi_a.c
+++ b/epan/dissectors/packet-ansi_a.c
@@ -2387,7 +2387,7 @@ elem_mid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, gu
if (curr_offset - offset >= len) /* Sanity check */
return (curr_offset - offset);
- str = tvb_bcd_dig_to_wmem_packet_str(tvb, curr_offset, len - (curr_offset - offset), &Dgt_meid, TRUE);
+ str = tvb_bcd_dig_to_str(pinfo->pool, tvb, curr_offset, len - (curr_offset - offset), &Dgt_meid, TRUE);
proto_tree_add_string(tree, hf_ansi_a_meid, tvb, curr_offset, len - (curr_offset - offset), str);
proto_item_append_text(data_p->elem_item, " - MEID (%s)", str);
@@ -2468,7 +2468,7 @@ elem_mid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, gu
if (curr_offset - offset >= len) /* Sanity check */
return (curr_offset - offset);
- str = tvb_bcd_dig_to_wmem_packet_str(tvb, curr_offset, len - (curr_offset - offset), &Dgt_msid, TRUE);
+ str = tvb_bcd_dig_to_str(pinfo->pool, tvb, curr_offset, len - (curr_offset - offset), &Dgt_msid, TRUE);
proto_tree_add_string_format(tree, hf_ansi_a_imsi, tvb, curr_offset, len - (curr_offset - offset),
str, "BCD Digits: %s", str);
@@ -4041,7 +4041,7 @@ elem_cld_party_bcd_num(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
if (curr_offset - offset >= len) /* Sanity check */
return (curr_offset - offset);
- str = tvb_bcd_dig_to_wmem_packet_str(tvb, curr_offset, len - (curr_offset - offset), &Dgt_tbcd, FALSE);
+ str = tvb_bcd_dig_to_str(pinfo->pool, tvb, curr_offset, len - (curr_offset - offset), &Dgt_tbcd, FALSE);
proto_tree_add_string(tree, hf_ansi_a_cld_party_bcd_num, tvb, curr_offset, len - (curr_offset - offset), str);
proto_item_append_text(data_p->elem_item, " - (%s)", str);
@@ -6997,7 +6997,7 @@ elem_dtmf_chars(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 off
return (curr_offset - offset);
packed_len = len - (curr_offset - offset);
- str = (char*)tvb_bcd_dig_to_wmem_packet_str(tvb, curr_offset, packed_len, &Dgt_dtmf, FALSE);
+ str = (char*)tvb_bcd_dig_to_str(pinfo->pool, tvb, curr_offset, packed_len, &Dgt_dtmf, FALSE);
/*
* the packed DTMF digits are not "terminated" with a '0xF' for an odd
* number of digits but the unpack routine expects it
diff --git a/epan/dissectors/packet-aprs.c b/epan/dissectors/packet-aprs.c
index ce1dcd3724..dd808e1680 100644
--- a/epan/dissectors/packet-aprs.c
+++ b/epan/dissectors/packet-aprs.c
@@ -1123,50 +1123,50 @@ dissect_aprs( tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *
{
/* Position "without APRS messaging" */
wmem_strbuf_append(sb, "Position (");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1, 8)); /* Lat */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1, 8)); /* Lat */
wmem_strbuf_append(sb, " ");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 8 + 1, 9)); /* Long */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 8 + 1, 9)); /* Long */
wmem_strbuf_append(sb, " ");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 8, 1)); /* Symbol table id */
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 8 + 1 + 9, 1)); /* Symbol Code */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 8, 1)); /* Symbol table id */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 8 + 1 + 9, 1)); /* Symbol Code */
}
break;
case '=':
/* Position "with APRS messaging" + Ext APRS message */
wmem_strbuf_append(sb, " (");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1, 8)); /* Lat */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1, 8)); /* Lat */
wmem_strbuf_append(sb, " ");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 8 + 1, 9)); /* Long */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 8 + 1, 9)); /* Long */
wmem_strbuf_append(sb, " ");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 8, 1)); /* Symbol table id */
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 8 + 1 + 9, 1)); /* Symbol Code */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 8, 1)); /* Symbol table id */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 8 + 1 + 9, 1)); /* Symbol Code */
break;
case '/':
/* Position + timestamp "without APRS messaging" */
wmem_strbuf_append(sb, " (");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1, 7)); /* Timestamp */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1, 7)); /* Timestamp */
wmem_strbuf_append(sb, " ");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 7 + 1, 8)); /*??*/ /* Lat */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 7 + 1, 8)); /*??*/ /* Lat */
wmem_strbuf_append(sb, " ");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 7 + 8 + 1, 9)); /* Long */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 7 + 8 + 1, 9)); /* Long */
wmem_strbuf_append(sb, " ");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 7, 1)); /* Symbol table id */
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 7 + 1 + 9, 1)); /* Symbol Code */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 7, 1)); /* Symbol table id */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 7 + 1 + 9, 1)); /* Symbol Code */
break;
case '@':
/* Position + timestamp "with APRS messaging" + Ext APRS message */
wmem_strbuf_append(sb, " (");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1, 7)); /* Timestamp */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1, 7)); /* Timestamp */
wmem_strbuf_append(sb, " ");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 7 + 1, 8)); /*??*/ /* Lat */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 7 + 1, 8)); /*??*/ /* Lat */
wmem_strbuf_append(sb, " ");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 7 + 8 + 1, 9)); /* Long */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 7 + 8 + 1, 9)); /* Long */
wmem_strbuf_append(sb, " ");
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 7, 1)); /* Symbol table id */
- wmem_strbuf_append(sb, tvb_format_text(tvb, offset + 1 + 7 + 1 + 9, 1)); /* Symbol Code */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 7, 1)); /* Symbol table id */
+ wmem_strbuf_append(sb, tvb_format_text(pinfo->pool, tvb, offset + 1 + 7 + 1 + 9, 1)); /* Symbol Code */
break;
}
diff --git a/epan/dissectors/packet-asap.c b/epan/dissectors/packet-asap.c
index 3d5fd6b61d..c8287e0257 100644
--- a/epan/dissectors/packet-asap.c
+++ b/epan/dissectors/packet-asap.c
@@ -341,7 +341,7 @@ dissect_pool_handle_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tre
pi = proto_tree_add_item(parameter_tree, hf_pool_handle, parameter_tvb, POOL_HANDLE_OFFSET, handle_length, ENC_NA);
proto_item_append_text(pi, " (%s)",
- tvb_format_text(parameter_tvb, POOL_HANDLE_OFFSET, handle_length));
+ tvb_format_text(wmem_packet_scope(), parameter_tvb, POOL_HANDLE_OFFSET, handle_length));
}
static void
diff --git a/epan/dissectors/packet-ax25-nol3.c b/epan/dissectors/packet-ax25-nol3.c
index ca789c9c65..9747d8548d 100644
--- a/epan/dissectors/packet-ax25-nol3.c
+++ b/epan/dissectors/packet-ax25-nol3.c
@@ -79,13 +79,13 @@ dissect_dx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* dat
col_set_str( pinfo->cinfo, COL_PROTOCOL, "DX" );
- col_add_fstr( pinfo->cinfo, COL_INFO, "%s", tvb_format_text( tvb, offset, 15 ) );
+ col_add_fstr( pinfo->cinfo, COL_INFO, "%s", tvb_format_text( pinfo->pool, tvb, offset, 15 ) );
if ( parent_tree )
{
/* create display subtree for the protocol */
ti = proto_tree_add_protocol_format( parent_tree, proto_dx, tvb, 0, -1,
- "DX (%s)", tvb_format_text( tvb, offset, 15 ) );
+ "DX (%s)", tvb_format_text( pinfo->pool, tvb, offset, 15 ) );
dx_tree = proto_item_add_subtree( ti, ett_dx );
offset = 0;
diff --git a/epan/dissectors/packet-beep.c b/epan/dissectors/packet-beep.c
index dbcedd6b3d..15163865c8 100644
--- a/epan/dissectors/packet-beep.c
+++ b/epan/dissectors/packet-beep.c
@@ -278,7 +278,7 @@ check_term(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree)
}
proto_tree_add_expert_format(tree, pinfo, &ei_beep_invalid_terminator, tvb,
- offset, 1, "Terminator: %s", tvb_format_text(tvb, offset, 2));
+ offset, 1, "Terminator: %s", tvb_format_text(pinfo->pool, tvb, offset, 2));
return -1;
}
@@ -776,7 +776,7 @@ dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
* of the packet, so it won't throw an exception.
*/
if (tvb_reported_length_remaining(tvb, offset) > 0)
- col_add_str(pinfo->cinfo, COL_INFO, tvb_format_text(tvb, offset, tvb_reported_length_remaining(tvb, offset)));
+ col_add_str(pinfo->cinfo, COL_INFO, tvb_format_text(pinfo->pool, tvb, offset, tvb_reported_length_remaining(tvb, offset)));
/* Here, we parse the message so we can retrieve the info we need, which
* is that there is some payload left from a previous segment on the
diff --git a/epan/dissectors/packet-bencode.c b/epan/dissectors/packet-bencode.c
index a98a197ee2..8ffd5eae70 100644
--- a/epan/dissectors/packet-bencode.c
+++ b/epan/dissectors/packet-bencode.c
@@ -72,11 +72,11 @@ static int dissect_bencoding_str(tvbuff_t *tvb, packet_info *pinfo,
if (treeadd == 1) {
proto_item_append_text(ti, " Key: %s",
- tvb_format_text(tvb, offset + used, stringlen));
+ tvb_format_text(pinfo->pool, tvb, offset + used, stringlen));
}
if (treeadd == 2) {
proto_item_append_text(ti, " Value: %s",
- tvb_format_text(tvb, offset + used, stringlen));
+ tvb_format_text(pinfo->pool, tvb, offset + used, stringlen));
}
}
return used + stringlen;
diff --git a/epan/dissectors/packet-bthci_cmd.c b/epan/dissectors/packet-bthci_cmd.c
index c20f223bc1..d6ac5d77db 100644
--- a/epan/dissectors/packet-bthci_cmd.c
+++ b/epan/dissectors/packet-bthci_cmd.c
@@ -9055,7 +9055,7 @@ dissect_eir_ad_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, bluetoo
case 0x08: /* Device Name (shortened) */
case 0x09: /* Device Name */
proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_name, tvb, offset, length, ENC_UTF_8 | ENC_NA);
- proto_item_append_text(entry_item, ": %s", tvb_format_text(tvb, offset, length));
+ proto_item_append_text(entry_item, ": %s", tvb_format_text(pinfo->pool, tvb, offset, length));
if (!name || type == 0x09)
name = tvb_get_string_enc(pinfo->pool, tvb, offset, length, ENC_UTF_8);
offset += length;
@@ -9472,7 +9472,7 @@ dissect_eir_ad_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, bluetoo
break;
case 0x2d: /* Broadcast Code */
proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_broadcast_code, tvb, offset, length, ENC_UTF_8 | ENC_NA);
- proto_item_append_text(entry_item, ": %s", tvb_format_text(tvb, offset, length));
+ proto_item_append_text(entry_item, ": %s", tvb_format_text(pinfo->pool, tvb, offset, length));
offset += length;
break;
diff --git a/epan/dissectors/packet-bthfp.c b/epan/dissectors/packet-bthfp.c
index ce93ec01af..0c6f14eee6 100644
--- a/epan/dissectors/packet-bthfp.c
+++ b/epan/dissectors/packet-bthfp.c
@@ -2209,7 +2209,7 @@ dissect_bthfp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
if (role == ROLE_UNKNOWN) {
col_append_fstr(pinfo->cinfo, COL_INFO, "Data: %s",
- tvb_format_text(tvb, 0, tvb_reported_length(tvb)));
+ tvb_format_text(pinfo->pool, tvb, 0, tvb_reported_length(tvb)));
proto_tree_add_item(main_tree, hf_data, tvb, 0, tvb_captured_length(tvb), ENC_NA | ENC_ASCII);
return tvb_reported_length(tvb);
}
diff --git a/epan/dissectors/packet-bthsp.c b/epan/dissectors/packet-bthsp.c
index ba559a6fea..564921cc84 100644
--- a/epan/dissectors/packet-bthsp.c
+++ b/epan/dissectors/packet-bthsp.c
@@ -757,7 +757,7 @@ dissect_bthsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
if (role == ROLE_UNKNOWN) {
col_append_fstr(pinfo->cinfo, COL_INFO, "Data: %s",
- tvb_format_text(tvb, 0, tvb_reported_length(tvb)));
+ tvb_format_text(pinfo->pool, tvb, 0, tvb_reported_length(tvb)));
proto_tree_add_item(main_tree, hf_data, tvb, 0, tvb_captured_length(tvb), ENC_NA | ENC_ASCII);
return tvb_reported_length(tvb);
}
diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c
index c0647d0848..1dd326872c 100644
--- a/epan/dissectors/packet-btrfcomm.c
+++ b/epan/dissectors/packet-btrfcomm.c
@@ -1214,7 +1214,7 @@ dissect_btdun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
/* presumably an AT command */
col_add_fstr(pinfo->cinfo, COL_INFO, "%s \"%s\"",
(pinfo->p2p_dir == P2P_DIR_SENT) ? "Sent" : "Rcvd",
- tvb_format_text(tvb, 0, length));
+ tvb_format_text(pinfo->pool, tvb, 0, length));
proto_tree_add_item(st, hf_dun_at_cmd, tvb, 0, tvb_reported_length(tvb), ENC_ASCII|ENC_NA);
}
@@ -1293,7 +1293,7 @@ dissect_btspp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
if (ascii_only) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s \"%s%s\"",
(pinfo->p2p_dir == P2P_DIR_SENT) ? "Sent" : "Rcvd",
- tvb_format_text(tvb, 0, length),
+ tvb_format_text(pinfo->pool, tvb, 0, length),
(tvb_captured_length(tvb) > length) ? "..." : "");
}
@@ -1349,7 +1349,7 @@ dissect_btgnss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
(pinfo->p2p_dir == P2P_DIR_SENT) ? "Sent" : "Rcvd",
- tvb_format_text(tvb, 0, tvb_captured_length(tvb)));
+ tvb_format_text(pinfo->pool, tvb, 0, tvb_captured_length(tvb)));
/* GNSS using NMEA-0183 protocol, but it is not available */
proto_tree_add_item(main_tree, hf_gnss_data, tvb, 0, tvb_reported_length(tvb), ENC_NA | ENC_ASCII);
diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c
index 76aefa10f3..dcf38d1435 100644
--- a/epan/dissectors/packet-cdp.c
+++ b/epan/dissectors/packet-cdp.c
@@ -361,12 +361,12 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
col_append_fstr(pinfo->cinfo, COL_INFO,
"Device ID: %s ",
- tvb_format_stringzpad(tvb, offset + 4, length - 4));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 4, length - 4));
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb, offset,
length, ett_cdp_tlv, NULL, "Device ID: %s",
- tvb_format_stringzpad(tvb, offset + 4, length - 4));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_deviceid, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -390,13 +390,13 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
col_append_fstr(pinfo->cinfo, COL_INFO,
"Port ID: %s ",
- tvb_format_stringzpad(tvb, offset + 4,
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 4,
length - 4));
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb, offset,
real_length, ett_cdp_tlv, NULL, "Port ID: %s",
- tvb_format_text(tvb, offset + 4, real_length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, real_length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_portid, tvb, offset + 4, real_length - 4, ENC_ASCII|ENC_NA);
@@ -461,7 +461,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Platform: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -540,7 +540,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "VTP Management Domain: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_vtp_management_domain, tvb, offset + 4, length - 4, ENC_NA|ENC_ASCII);
@@ -683,7 +683,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "System Name: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_system_name, tvb, offset + 4, length - 4, ENC_NA|ENC_ASCII);
@@ -734,7 +734,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Location: %s",
- tvb_format_text(tvb, offset + 5, length - 5));
+ tvb_format_text(pinfo->pool, tvb, offset + 5, length - 5));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_location_unknown, tvb, offset + 4, 1, ENC_BIG_ENDIAN);
@@ -855,7 +855,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "BSSID: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -868,7 +868,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Serial: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -887,7 +887,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
} else {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "SSID: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -901,7 +901,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Radio 1 channel: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -914,7 +914,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "SNMP port: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -927,7 +927,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Web mgmt port: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -940,7 +940,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Source MAC: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -953,7 +953,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Radio 2 channel: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -966,7 +966,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Radio 1 operating mode: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -979,7 +979,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Radio 2 operating mode: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -992,7 +992,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Radio 1 radio mode: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -1005,7 +1005,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tree) {
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb,
offset, length, ett_cdp_tlv, NULL, "Radio 2 radio mode: %s",
- tvb_format_text(tvb, offset + 4, length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_cdp_platform, tvb, offset + 4, length - 4, ENC_ASCII|ENC_NA);
@@ -1207,7 +1207,7 @@ dissect_nrgyz_tlv(tvbuff_t *tvb, packet_info* pinfo, int offset, guint16 length,
case TYPE_NRGYZ_NAME:
etree = proto_tree_add_subtree_format(tree, tvb, offset,
tlvl, ett_cdp_nrgyz_tlv, NULL, "EnergyWise %s: %s", ttext,
- tvb_format_stringzpad(tvb, offset + 8, tlvl - 8)
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 8, tlvl - 8)
);
break;
case TYPE_NRGYZ_REPLYTO:
@@ -1284,7 +1284,7 @@ add_multi_line_string_to_tree(proto_tree *tree, tvbuff_t *tvb, gint start,
while (len > 0) {
line_len = tvb_find_line_end(tvb, start, len, &next, FALSE);
data_len = next - start;
- proto_tree_add_string(tree, hf, tvb, start, data_len, tvb_format_stringzpad(tvb, start, line_len));
+ proto_tree_add_string(tree, hf, tvb, start, data_len, tvb_format_stringzpad(wmem_packet_scope(), tvb, start, line_len));
start += data_len;
len -= data_len;
}
diff --git a/epan/dissectors/packet-cimd.c b/epan/dissectors/packet-cimd.c
index c91ea99c7c..2ddc479b4c 100644
--- a/epan/dissectors/packet-cimd.c
+++ b/epan/dissectors/packet-cimd.c
@@ -480,7 +480,7 @@ static void dissect_cimd_ud(tvbuff_t *tvb, proto_tree *tree, gint pindex, gint s
g_offset = startOffset + 1 + CIMD_PC_LENGTH + 1;
g_size = endOffset - g_offset;
- payloadText = tvb_format_text(tvb, g_offset, g_size);
+ payloadText = tvb_format_text(wmem_packet_scope(), tvb, g_offset, g_size);
size = (int)strlen(payloadText);
tmpBuffer = (gchar*)wmem_alloc(wmem_packet_scope(), size+1);
for (loop = 0; loop < size; loop++)
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c
index 3e07af394f..08651f7d18 100644
--- a/epan/dissectors/packet-cip.c
+++ b/epan/dissectors/packet-cip.c
@@ -4289,7 +4289,7 @@ static int dissect_segment_symbolic(tvbuff_t *tvb, proto_tree *path_seg_tree,
if (symbol_size != 0)
{
gchar *symbol_name;
- symbol_name = tvb_format_text(tvb, offset + 1, symbol_size);
+ symbol_name = tvb_format_text(wmem_packet_scope(), tvb, offset + 1, symbol_size);
proto_item_append_text(path_seg_item, " (Symbolic Segment)");
@@ -4506,7 +4506,7 @@ static int dissect_segment_port(tvbuff_t* tvb, int offset, gboolean generate,
proto_item* it = proto_tree_add_uint(path_seg_item, hf_cip_link_address_size, tvb, 0, 0, opt_link_size);
proto_item_set_generated(it);
/* Add extended link address */
- it = proto_tree_add_string(path_seg_item, hf_cip_link_address_string, tvb, 0, 0, tvb_format_text(tvb, offset + offset_link_address, opt_link_size));
+ it = proto_tree_add_string(path_seg_item, hf_cip_link_address_string, tvb, 0, 0, tvb_format_text(wmem_packet_scope(), tvb, offset + offset_link_address, opt_link_size));
proto_item_set_generated(it);
}
else
@@ -4515,7 +4515,7 @@ static int dissect_segment_port(tvbuff_t* tvb, int offset, gboolean generate,
proto_tree_add_item(path_seg_item, hf_cip_link_address_string, tvb, offset + offset_link_address, opt_link_size, ENC_ASCII | ENC_NA);
}
- proto_item_append_text(epath_item, ", Address: %s", tvb_format_text(tvb, offset + offset_link_address, opt_link_size));
+ proto_item_append_text(epath_item, ", Address: %s", tvb_format_text(wmem_packet_scope(), tvb, offset + offset_link_address, opt_link_size));
/* Pad byte */
if (opt_link_size % 2)
@@ -4764,7 +4764,7 @@ static int dissect_segment_ansi_extended_symbol(packet_info* pinfo, tvbuff_t* tv
/* Segment data */
if (seg_size != 0)
{
- gchar* symbol_name = tvb_format_text(tvb, offset + 2, seg_size);
+ gchar* symbol_name = tvb_format_text(pinfo->pool, tvb, offset + 2, seg_size);
if (generate)
{
diff --git a/epan/dissectors/packet-daap.c b/epan/dissectors/packet-daap.c
index 038407881f..dfe8fc7ffd 100644
--- a/epan/dissectors/packet-daap.c
+++ b/epan/dissectors/packet-daap.c
@@ -415,7 +415,7 @@ dissect_daap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
*/
col_set_str(pinfo->cinfo, COL_INFO, "DAAP Response");
col_append_fstr(pinfo->cinfo, COL_INFO, " [first tag: %s, size: %d]",
- tvb_format_text(tvb, 0, 4),
+ tvb_format_text(pinfo->pool, tvb, 0, 4),
tvb_get_ntohl(tvb, 4));
ti = proto_tree_add_item(tree, proto_daap, tvb, 0, -1, ENC_NA);
diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c
index 744009a460..7f822e15c1 100644
--- a/epan/dissectors/packet-dcm.c
+++ b/epan/dissectors/packet-dcm.c
@@ -2574,10 +2574,10 @@ dissect_dcm_tag_value(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dcm_s
val8 = tvb_get_guint8(tvb, offset + vl_max - 1);
if (val8 == 0x00) {
/* Last byte of string is 0x00, i.e. padded */
- vals = tvb_format_text(tvb, offset, vl_max - 1);
+ vals = tvb_format_text(pinfo->pool, tvb, offset, vl_max - 1);
}
else {
- vals = tvb_format_text(tvb, offset, vl_max);
+ vals = tvb_format_text(pinfo->pool, tvb, offset, vl_max);
}
if ((strncmp(vr, "UI", 2) == 0)) {
@@ -2649,7 +2649,7 @@ dissect_dcm_tag_value(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dcm_s
}
if (is_string) {
- vals = tvb_format_text(tvb, offset, (is_padded ? vl_max - 1 : vl_max));
+ vals = tvb_format_text(pinfo->pool, tvb, offset, (is_padded ? vl_max - 1 : vl_max));
proto_tree_add_string(tree, hf_dcm_tag_value_str, tvb, offset, vl_max, vals);
*tag_value = vals;
diff --git a/epan/dissectors/packet-dhcp.c b/epan/dissectors/packet-dhcp.c
index f50854a4e6..53b1ead739 100644
--- a/epan/dissectors/packet-dhcp.c
+++ b/epan/dissectors/packet-dhcp.c
@@ -5695,7 +5695,7 @@ dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tv
ti = proto_tree_add_uint_format(v_tree, hf_dhcp_pkt_mta_cap_type,
tvb, off, 2, raw_val, "0x%s: %s = ",
- tvb_format_text(tvb, off, 2),
+ tvb_format_text(pinfo->pool, tvb, off, 2),
val_to_str_const(raw_val, pkt_mdc_type_vals, "unknown"));
proto_item_set_len(ti, (tlv_len * 2) + 4);
switch (raw_val) {
@@ -5705,14 +5705,14 @@ dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tv
proto_item_append_text(ti,
"%s (%s)",
val_to_str_const(raw_val, pkt_mdc_version_vals, "Reserved"),
- tvb_format_stringzpad(tvb, off + 4, 2) );
+ tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) );
break;
case PKT_MDC_TEL_END:
case PKT_MDC_IF_INDEX:
proto_item_append_text(ti,
"%s",
- tvb_format_stringzpad(tvb, off + 4, 2) );
+ tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) );
break;
case PKT_MDC_TGT:
@@ -5742,7 +5742,7 @@ dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tv
proto_item_append_text(ti,
"%s (%s)",
val_to_str_const(raw_val, pkt_mdc_boolean_vals, "unknown"),
- tvb_format_stringzpad(tvb, off + 4, 2) );
+ tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) );
break;
case PKT_MDC_SUPP_CODECS:
@@ -5753,7 +5753,7 @@ dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tv
"%s%s (%s)",
plurality(i + 1, "", ", "),
val_to_str_const(raw_val, pkt_mdc_codec_vals, "unknown"),
- tvb_format_stringzpad(tvb, off + 4 + (i * 2), 2) );
+ tvb_format_stringzpad(pinfo->pool, tvb, off + 4 + (i * 2), 2) );
}
break;
@@ -5771,7 +5771,7 @@ dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tv
proto_item_append_text(ti,
"%s (%s)",
val_to_str_const(raw_val, pkt_mdc_t38_version_vals, "unknown"),
- tvb_format_stringzpad(tvb, off + 4, 2) );
+ tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) );
break;
case PKT_MDC_T38_EC:
@@ -5779,7 +5779,7 @@ dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tv
proto_item_append_text(ti,
"%s (%s)",
val_to_str_const(raw_val, pkt_mdc_t38_ec_vals, "unknown"),
- tvb_format_stringzpad(tvb, off + 4, 2) );
+ tvb_format_stringzpad(pinfo->pool, tvb, off + 4, 2) );
break;
case PKT_MDC_MIBS:
@@ -5789,7 +5789,7 @@ dissect_packetcable_mta_cap(proto_tree *v_tree, packet_info *pinfo, tvbuff_t *tv
default:
proto_item_append_text(ti,
"%s",
- tvb_format_stringzpad(tvb, off + 4, tlv_len * 2) );
+ tvb_format_stringzpad(pinfo->pool, tvb, off + 4, tlv_len * 2) );
break;
}
}
@@ -6639,7 +6639,7 @@ dissect_packetcable_i05_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_
case PKT_CCC_KRB_REALM:
case PKT_CCC_CMS_FQDN:
proto_item_append_text(vti, "%s (%u byte%s)",
- tvb_format_stringzpad(tvb, suboptoff, subopt_len),
+ tvb_format_stringzpad(pinfo->pool, tvb, suboptoff, subopt_len),
subopt_len,
plurality(subopt_len, "", "s") );
suboptoff += subopt_len;
diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c
index 5b2ce6c8df..97b6cf050f 100644
--- a/epan/dissectors/packet-dhcpv6.c
+++ b/epan/dissectors/packet-dhcpv6.c
@@ -1584,7 +1584,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i
opt_len = tlv_len;
field_len = tlv_len;
proto_item_append_text(ti, "\"%s\"",
- tvb_format_stringzpad(tvb, sub_off, field_len));
+ tvb_format_stringzpad(pinfo->pool, tvb, sub_off, field_len));
break;
case CL_OPTION_VENDOR_OUI:
/* CableLabs specs treat 17.8 inconsistently
@@ -1594,7 +1594,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i
proto_item_append_text(ti, "%s",
tvb_bytes_to_str_punct(pinfo->pool, tvb, sub_off, 3, ':'));
} else if (tlv_len == 6) {
- proto_item_append_text(ti, "\"%s\"", tvb_format_stringzpad(tvb, sub_off, tlv_len));
+ proto_item_append_text(ti, "\"%s\"", tvb_format_stringzpad(pinfo->pool, tvb, sub_off, tlv_len));
} else {
expert_add_info_format(pinfo, ti, &ei_dhcpv6_bogus_length, "Suboption %d: suboption length isn't 3 or 6", type);
}
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c
index 542775918f..bf2d5d6f0f 100644
--- a/epan/dissectors/packet-dns.c
+++ b/epan/dissectors/packet-dns.c
@@ -3587,7 +3587,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
default:
if (svc_param_length > 0) {
proto_tree_add_item(svcb_param_tree, hf_dns_svcb_param_value, tvb, cur_offset, svc_param_length, ENC_NA);
- proto_item_append_text(svcb_param_ti, "=%s", tvb_format_text(tvb, cur_offset, svc_param_length));
+ proto_item_append_text(svcb_param_ti, "=%s", tvb_format_text(pinfo->pool, tvb, cur_offset, svc_param_length));
cur_offset += svc_param_length;
}
break;
diff --git a/epan/dissectors/packet-dpnss.c b/epan/dissectors/packet-dpnss.c
index bad1ebe200..a2ea1826b1 100644
--- a/epan/dissectors/packet-dpnss.c
+++ b/epan/dissectors/packet-dpnss.c
@@ -1023,7 +1023,7 @@ dissect_dpnns_sup_str_par(tvbuff_t *tvb, proto_tree * tree, int par_type_num, in
case DPNSS_CAUSE:
*/
default:
- par_data = tvb_format_text(tvb,par_start_offset, par_len);
+ par_data = tvb_format_text(wmem_packet_scope(), tvb,par_start_offset, par_len);
/* Used to print all pars without any special handling */
proto_tree_add_string_format(tree, hf_dpnss_parameter, tvb, par_start_offset, par_len, par_data, "Parameter %s: %s",
val_to_str(par_type_num, dpnss_sup_serv_par_str_vals, "Unknown (%d)" ), par_data);
@@ -1090,7 +1090,7 @@ dissect_dpnss_sup_info_str(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
hash_offset = tvb_find_guint8(tvb, offset, -1, '#');
sup_str_tree = proto_tree_add_subtree_format(tree, tvb, start_offset, hash_offset-start_offset+1,
ett_dpnss_sup_str, NULL, "Supplementary Information %u: %s",str_no,
- tvb_format_text(tvb,start_offset,hash_offset-start_offset+1));
+ tvb_format_text(pinfo->pool, tvb,start_offset,hash_offset-start_offset+1));
/* SUPPLEMENTARY INFORMATION STRING IDENTIFIER
* Get the parameter number string and translate it to an index into the dpnns_sup_serv_set.
* The number may have a trailing alpha character at the end.
@@ -1102,7 +1102,7 @@ dissect_dpnss_sup_info_str(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
sup_inf_str_end_offset = hash_offset;
}
sup_inf_str_len = sup_inf_str_end_offset - offset;
- ws_strtou32(tvb_format_text(tvb, offset, sup_inf_str_len), NULL, &sup_str_num);
+ ws_strtou32(tvb_format_text(pinfo->pool, tvb, offset, sup_inf_str_len), NULL, &sup_str_num);
if ((sup_str_num != 0) && (sup_str_num < array_length(dpnns_sup_serv_set))) {
proto_tree_add_string(sup_str_tree, hf_dpnss_sup_str, tvb, offset, sup_inf_str_len,
dpnns_sup_serv_set[sup_str_num].compact_name);
diff --git a/epan/dissectors/packet-dtp.c b/epan/dissectors/packet-dtp.c
index 73db6cff69..77e03ab568 100644
--- a/epan/dissectors/packet-dtp.c
+++ b/epan/dissectors/packet-dtp.c
@@ -205,7 +205,7 @@ dissect_dtp_tlv(packet_info *pinfo, tvbuff_t *tvb, int offset, int length,
case DTP_TLV_DOMAIN:
if (length <= 33) { /* VTP domain name is at most 32 bytes long and is null-terminated */
- proto_item_append_text(ti, ": %s", tvb_format_text(tvb, offset, length - 1));
+ proto_item_append_text(ti, ": %s", tvb_format_text(pinfo->pool, tvb, offset, length - 1));
proto_tree_add_item(tree, hf_dtp_domain, tvb, offset, length, ENC_ASCII|ENC_NA);
}
else
diff --git a/epan/dissectors/packet-dua.c b/epan/dissectors/packet-dua.c
index 716a73c3fa..789d585968 100644
--- a/epan/dissectors/packet-dua.c
+++ b/epan/dissectors/packet-dua.c
@@ -101,7 +101,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_format_text(parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
+ tvb_format_text(wmem_packet_scope(), parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
}
#define INFO_STRING_OFFSET PARAMETER_VALUE_OFFSET
@@ -115,7 +115,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_format_text(parameter_tvb, INFO_STRING_OFFSET, info_string_length));
+ tvb_format_text(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length));
}
#define DLCI_LENGTH 2
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c
index 6a5d495f9a..0fc8c31e9f 100644
--- a/epan/dissectors/packet-enip.c
+++ b/epan/dissectors/packet-enip.c
@@ -2404,7 +2404,7 @@ static void dissect_item_list_identity(packet_info* pinfo, tvbuff_t* tvb, int of
proto_tree_add_item(item_tree, hf_enip_lir_name, tvb, offset + 33, name_length, ENC_ASCII | ENC_NA);
/* Append product name to info column */
- col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", tvb_format_text(tvb, offset + 33, name_length));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", tvb_format_text(pinfo->pool, tvb, offset + 33, name_length));
/* State */
proto_tree_add_item(item_tree, hf_enip_lir_state, tvb, offset + name_length + 33, 1, ENC_LITTLE_ENDIAN);
@@ -2454,7 +2454,7 @@ static void dissect_item_list_services_response(packet_info* pinfo, tvbuff_t* tv
/* Append service name to info column */
col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
- tvb_format_stringzpad(tvb, offset + 4, 16));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 4, 16));
}
static void display_fwd_open_connection_path(cip_conn_info_t* conn_info, proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo)
diff --git a/epan/dissectors/packet-enrp.c b/epan/dissectors/packet-enrp.c
index 73aea0ab2a..976813def8 100644
--- a/epan/dissectors/packet-enrp.c
+++ b/epan/dissectors/packet-enrp.c
@@ -347,7 +347,7 @@ dissect_pool_handle_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tre
pi = proto_tree_add_item(parameter_tree, hf_pool_handle, parameter_tvb, POOL_HANDLE_OFFSET, handle_length, ENC_NA);
proto_item_append_text(pi, " (%s)",
- tvb_format_text(parameter_tvb, POOL_HANDLE_OFFSET, handle_length) );
+ tvb_format_text(wmem_packet_scope(), parameter_tvb, POOL_HANDLE_OFFSET, handle_length) );
}
static void
diff --git a/epan/dissectors/packet-f5ethtrailer.c b/epan/dissectors/packet-f5ethtrailer.c
index 5079c9a1eb..82c94de226 100644
--- a/epan/dissectors/packet-f5ethtrailer.c
+++ b/epan/dissectors/packet-f5ethtrailer.c
@@ -2477,7 +2477,7 @@ dissect_dpt_trailer_noise_low(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* Cannot go any further */
return len;
}
- gchar *text = tvb_format_text(tvb, offset +1, viplen);
+ gchar *text = tvb_format_text(pinfo->pool, tvb, offset +1, viplen);
ti = proto_tree_add_subtree_format(
tree, tvb, offset, viplen + 1, ett_f5ethtrailer_obj_names, NULL,
"Virtual Server: %s", text);
@@ -2566,7 +2566,7 @@ dissect_dpt_trailer_noise_low(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* Cannot go any further */
return len;
}
- gchar *text = tvb_format_text(data_tvb, data_off + 2, l);
+ gchar *text = tvb_format_text(pinfo->pool, data_tvb, data_off + 2, l);
ti = proto_tree_add_subtree_format(
tree, data_tvb, data_off, l + 2, ett_f5ethtrailer_obj_names, NULL,
text_format, text);
diff --git a/epan/dissectors/packet-fefd.c b/epan/dissectors/packet-fefd.c
index 7901df8714..7ef3cdfbb9 100644
--- a/epan/dissectors/packet-fefd.c
+++ b/epan/dissectors/packet-fefd.c
@@ -131,13 +131,13 @@ dissect_fefd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL,
"Device ID: %s",
- tvb_format_stringzpad(tvb, offset + 4,
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 4,
length - 4));
if (tree) {
tlv_tree = proto_tree_add_subtree_format(fefd_tree, tvb, offset,
length, ett_fefd_tlv, NULL, "Device ID: %s",
- tvb_format_stringzpad(tvb, offset + 4, length - 4));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_uint(tlv_tree, hf_fefd_tlvtype, tvb,
offset + TLV_TYPE, 2, type);
proto_tree_add_uint(tlv_tree, hf_fefd_tlvlength, tvb,
@@ -162,12 +162,12 @@ dissect_fefd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL,
"Port ID: %s",
- tvb_format_stringzpad(tvb, offset + 4, real_length - 4));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 4, real_length - 4));
if (tree) {
tlv_tree = proto_tree_add_subtree_format(fefd_tree, tvb, offset,
real_length, ett_fefd_tlv, NULL, "Port ID: %s",
- tvb_format_text(tvb, offset + 4, real_length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, real_length - 4));
proto_tree_add_uint(tlv_tree, hf_fefd_tlvtype, tvb,
offset + TLV_TYPE, 2, type);
proto_tree_add_uint(tlv_tree, hf_fefd_tlvlength, tvb,
diff --git a/epan/dissectors/packet-gdsdb.c b/epan/dissectors/packet-gdsdb.c
index 95fed7e91d..653c5627c4 100644
--- a/epan/dissectors/packet-gdsdb.c
+++ b/epan/dissectors/packet-gdsdb.c
@@ -538,7 +538,7 @@ gdsdb_connect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
proto_tree_add_item(tree, hf_gdsdb_connect_count, tvb,
offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", tvb_format_text(tvb, offset+4, tvb_get_ntohl(tvb, offset)));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", tvb_format_text(pinfo->pool, tvb, offset+4, tvb_get_ntohl(tvb, offset)));
offset = add_uint_string(tree, hf_gdsdb_connect_userid, tvb, offset);
for(i=0;i<count;i++){
@@ -630,7 +630,7 @@ gdsdb_attach(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
proto_tree_add_item(tree, hf_gdsdb_attach_database_object_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", tvb_format_text(tvb, offset+4, tvb_get_ntohl(tvb, offset)));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", tvb_format_text(pinfo->pool, tvb, offset+4, tvb_get_ntohl(tvb, offset)));
offset = add_uint_string(tree, hf_gdsdb_attach_database_path, tvb, offset);
offset = add_uint_string(tree, hf_gdsdb_attach_database_param_buf, tvb, offset);
@@ -1169,7 +1169,7 @@ gdsdb_prepare(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
proto_tree_add_item(tree, hf_gdsdb_prepare_dialect, tvb,
offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", tvb_format_text(tvb, offset+4, tvb_get_ntohl(tvb, offset)));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", tvb_format_text(pinfo->pool, tvb, offset+4, tvb_get_ntohl(tvb, offset)));
offset = add_uint_string(tree, hf_gdsdb_prepare_querystr, tvb, offset);
proto_tree_add_item(tree, hf_gdsdb_prepare_bufferlength, tvb,
diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c
index 100c3e3b51..9c796adb80 100644
--- a/epan/dissectors/packet-gsm_a_common.c
+++ b/epan/dissectors/packet-gsm_a_common.c
@@ -2335,7 +2335,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
if((oct & 0x07) == 3){
/* imeisv */
- digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb ,curr_offset , len - (curr_offset - offset), NULL, TRUE);
+ digit_str = tvb_bcd_dig_to_str(pinfo->pool, tvb ,curr_offset , len - (curr_offset - offset), NULL, TRUE);
proto_tree_add_string_format(tree,
hf_gsm_a_imeisv,
tvb, curr_offset, len - (curr_offset - offset),
@@ -2375,7 +2375,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
if (curr_offset - offset >= len) /* Sanity check */
return (curr_offset - offset);
- digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb, curr_offset, len - (curr_offset - offset), NULL, TRUE);
+ digit_str = tvb_bcd_dig_to_str(pinfo->pool, tvb, curr_offset, len - (curr_offset - offset), NULL, TRUE);
proto_tree_add_string_format(tree,
hf_gsm_a_imei,
diff --git a/epan/dissectors/packet-gsm_r_uus1.c b/epan/dissectors/packet-gsm_r_uus1.c
index ddeb42b851..0319c5c26a 100644
--- a/epan/dissectors/packet-gsm_r_uus1.c
+++ b/epan/dissectors/packet-gsm_r_uus1.c
@@ -159,7 +159,7 @@ de_gsm_r_uus1_pfn(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
if(len == 0) {
proto_item_append_text(item, ": No FN Available");
}else {
- fn_str = tvb_bcd_dig_to_wmem_packet_str(tvb, offset+2, len, NULL, FALSE);
+ fn_str = tvb_bcd_dig_to_str(wmem_packet_scope(), tvb, offset+2, len, NULL, FALSE);
proto_tree_add_string(sub_tree, hf_gsm_r_uus1_pfn_digits, tvb, curr_offset, len, fn_str);
proto_item_append_text(item, ": %s", fn_str);
@@ -520,7 +520,7 @@ de_gsm_r_uus1_dsd_alarm(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
proto_tree_add_item(sub_tree, hf_gsm_r_uus1_elem_len, tvb, curr_offset+1, 1, ENC_NA);
curr_offset += 2;
- loco_engine_number = tvb_bcd_dig_to_wmem_packet_str(tvb, offset+2, len, NULL, FALSE);
+ loco_engine_number = tvb_bcd_dig_to_str(pinfo->pool, tvb, offset+2, len, NULL, FALSE);
proto_tree_add_string(sub_tree, hf_gsm_r_uus1_present_dsd_alarm_loco_number, tvb, curr_offset, len, loco_engine_number);
proto_item_append_text(item, ": %s", loco_engine_number);
curr_offset += len;
diff --git a/epan/dissectors/packet-hislip.c b/epan/dissectors/packet-hislip.c
index 22f5eaa447..26ce69fd36 100644
--- a/epan/dissectors/packet-hislip.c
+++ b/epan/dissectors/packet-hislip.c
@@ -610,7 +610,7 @@ decode_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, hislipinfo *dat
if (data->payloadlength <= datalength)
datalength = data->payloadlength;
- col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_format_text(tvb, data->offset, (guint32)datalength));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_format_text(pinfo->pool, tvb, data->offset, (guint32)datalength));
proto_tree_add_item(tree, hf_hislip_data, tvb, data->offset, -1, ENC_UTF_8 |ENC_NA);
break;
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 384e0de0fb..a3410f28f6 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -1384,7 +1384,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
*/
saw_req_resp_or_header = TRUE;
if (is_request_or_reply) {
- char *text = tvb_format_text(tvb, offset, next_offset - offset);
+ char *text = tvb_format_text(pinfo->pool, tvb, offset, next_offset - offset);
req_tree = proto_tree_add_subtree(http_tree, tvb,
offset, next_offset - offset, ett_http_request, &hdr_item, text);
diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c
index f5575e55f2..23cc30c702 100644
--- a/epan/dissectors/packet-iax2.c
+++ b/epan/dissectors/packet-iax2.c
@@ -1305,10 +1305,10 @@ static guint32 dissect_ies(tvbuff_t *tvb, packet_info *pinfo, guint32 offset,
break;
case IAX_IE_CALLED_NUMBER:
- iax2_info->calledParty = tvb_format_text(tvb, offset+2, ies_len);
+ iax2_info->calledParty = tvb_format_text(pinfo->pool, tvb, offset+2, ies_len);
break;
case IAX_IE_CALLING_NUMBER:
- iax2_info->callingParty = tvb_format_text(tvb, offset+2, ies_len);
+ iax2_info->callingParty = tvb_format_text(pinfo->pool, tvb, offset+2, ies_len);
break;
case IAX_IE_APPARENT_ADDR:
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index a96cb1c5d7..8f0c997d32 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -19276,7 +19276,7 @@ dissect_ssid_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void*
if (offset + 2 + len > tag_len)
break;
- str = tvb_format_text(tvb, offset + 2, len);
+ str = tvb_format_text(pinfo->pool, tvb, offset + 2, len);
proto_item_append_text(tree, "%c %s", (first ? ':' : ','), str);
first = FALSE;
entry = proto_tree_add_subtree_format(tree, tvb, offset, 2 + len, ett_ssid_list, NULL, "SSID: %s", str);
diff --git a/epan/dissectors/packet-imap.c b/epan/dissectors/packet-imap.c
index 1571467e37..f5ba7e4d49 100644
--- a/epan/dissectors/packet-imap.c
+++ b/epan/dissectors/packet-imap.c
@@ -446,7 +446,7 @@ dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
} else {
if (first_line) {
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", is_request ? "Request" : "Response", tvb_format_text(tvb, offset, linelen));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", is_request ? "Request" : "Response", tvb_format_text(pinfo->pool, tvb, offset, linelen));
first_line = FALSE;
}
@@ -635,7 +635,7 @@ dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
// If there is only lines that begin with *, at least show the first one
if (first_line) {
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", is_request ? "Request" : "Response", tvb_format_text(tvb, 0, linelen));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", is_request ? "Request" : "Response", tvb_format_text(pinfo->pool, tvb, 0, linelen));
}
return tvb_captured_length(tvb);
diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c
index e4deebe8eb..9a2de8ef4b 100644
--- a/epan/dissectors/packet-imf.c
+++ b/epan/dissectors/packet-imf.c
@@ -831,7 +831,7 @@ dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if(f_info->add_to_col_info) {
col_append_fstr(pinfo->cinfo, COL_INFO, "%s: %s, ", f_info->name,
- tvb_format_text(tvb, value_offset, end_offset - value_offset - 2));
+ tvb_format_text(pinfo->pool, tvb, value_offset, end_offset - value_offset - 2));
/* if sender or subject, store for sending to the tap */
if (eo_info && have_tap_listener(imf_eo_tap)) {
diff --git a/epan/dissectors/packet-ipp.c b/epan/dissectors/packet-ipp.c
index aecd3034f5..c2f5864d61 100644
--- a/epan/dissectors/packet-ipp.c
+++ b/epan/dissectors/packet-ipp.c
@@ -687,14 +687,14 @@ parse_attributes(tvbuff_t *tvb, int offset, proto_tree *tree)
*/
name_length = tvb_get_ntohs(tvb, offset + 1);
if (name_length != 0)
- name = tvb_format_text(tvb, offset + 1 + 2, name_length);
+ name = tvb_format_text(wmem_packet_scope(), tvb, offset + 1 + 2, name_length);
/*
* OK, get the value length.
*/
value_length = tvb_get_ntohs(tvb, offset + 1 + 2 + name_length);
if (tag == TAG_MEMBERATTRNAME && value_length != 0)
- name = tvb_format_text(tvb, offset + 1 + 2 + name_length + 2, value_length);
+ name = tvb_format_text(wmem_packet_scope(), tvb, offset + 1 + 2 + name_length + 2, value_length);
/*
* OK, does the value run past the end of the
@@ -1020,9 +1020,9 @@ add_octetstring_tree(proto_tree *tree, tvbuff_t *tvb, int offset, int name_lengt
count ++;
if (value)
- value = wmem_strconcat(wmem_packet_scope(), value, ",'", tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2, value_length), "'", NULL);
+ value = wmem_strconcat(wmem_packet_scope(), value, ",'", tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2, value_length), "'", NULL);
else
- value = wmem_strconcat(wmem_packet_scope(), "'", tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2, value_length), "'", NULL);
+ value = wmem_strconcat(wmem_packet_scope(), "'", tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2, value_length), "'", NULL);
/*
* Move to the next value...
@@ -1183,12 +1183,12 @@ add_octetstring_tree(proto_tree *tree, tvbuff_t *tvb, int offset, int name_lengt
if (tvb_offset_exists(tvb, valoffset + 2 + language_length)) {
string_length = tvb_get_ntohs(tvb, valoffset + 2 + language_length);
if (tvb_offset_exists(tvb, valoffset + 2 + language_length + 2 + string_length)) {
- temp = wmem_strdup_printf(wmem_packet_scope(), "'%s'(%s)", tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2 + 2 + language_length + 2, string_length), tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2 + 2, language_length));
+ temp = wmem_strdup_printf(wmem_packet_scope(), "'%s'(%s)", tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2 + 2 + language_length + 2, string_length), tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2 + 2, language_length));
}
}
}
else {
- temp = wmem_strdup_printf(wmem_packet_scope(), "'%s'", tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2, value_length));
+ temp = wmem_strdup_printf(wmem_packet_scope(), "'%s'", tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2, value_length));
}
if (value)
@@ -1329,7 +1329,7 @@ add_octetstring_value(const gchar *tag_desc, proto_tree *tree, tvbuff_t *tvb,
if (tvb_offset_exists(tvb, valoffset + 2 + language_length)) {
int string_length = tvb_get_ntohs(tvb, valoffset + 2 + language_length);
if (tvb_offset_exists(tvb, valoffset + 2 + language_length + 2 + string_length)) {
- proto_tree_add_bytes_format(tree, tag == TAG_NAMEWITHLANGUAGE ? hf_ipp_namewithlanguage_value : hf_ipp_textwithlanguage_value, tvb, valoffset, value_length, NULL, "%s value: '%s'(%s)", tag_desc, tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2 + 2 + language_length + 2, string_length), tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2 + 2, language_length));
+ proto_tree_add_bytes_format(tree, tag == TAG_NAMEWITHLANGUAGE ? hf_ipp_namewithlanguage_value : hf_ipp_textwithlanguage_value, tvb, valoffset, value_length, NULL, "%s value: '%s'(%s)", tag_desc, tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2 + 2 + language_length + 2, string_length), tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2 + 2, language_length));
break;
}
}
@@ -1381,12 +1381,12 @@ add_charstring_tree(proto_tree *tree, tvbuff_t *tvb, int offset,
if (tvb_offset_exists(tvb, valoffset + 2 + language_length)) {
string_length = tvb_get_ntohs(tvb, valoffset + 2 + language_length);
if (tvb_offset_exists(tvb, valoffset + 2 + language_length + 2 + string_length)) {
- temp = wmem_strdup_printf(wmem_packet_scope(), "'%s'(%s)", tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2 + 2 + language_length + 2, string_length), tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2 + 2, language_length));
+ temp = wmem_strdup_printf(wmem_packet_scope(), "'%s'(%s)", tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2 + 2 + language_length + 2, string_length), tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2 + 2, language_length));
}
}
}
else {
- temp = wmem_strdup_printf(wmem_packet_scope(), "'%s'", tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2, value_length));
+ temp = wmem_strdup_printf(wmem_packet_scope(), "'%s'", tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2, value_length));
}
if (value)
@@ -1427,7 +1427,7 @@ add_charstring_value(const gchar *tag_desc, proto_tree *tree, tvbuff_t *tvb,
if (tag == TAG_MEMBERATTRNAME)
proto_tree_add_item(tree, hf_ipp_memberattrname, tvb, valoffset, value_length, ENC_ASCII|ENC_NA);
else
- proto_tree_add_string_format(tree, hf_ipp_charstring_value, tvb, valoffset, value_length, NULL, "%s value: '%s'", tag_desc, tvb_format_text(tvb, valoffset, value_length));
+ proto_tree_add_string_format(tree, hf_ipp_charstring_value, tvb, valoffset, value_length, NULL, "%s value: '%s'", tag_desc, tvb_format_text(wmem_packet_scope(), tvb, valoffset, value_length));
}
static int
@@ -1464,7 +1464,7 @@ ipp_fmt_collection(tvbuff_t *tvb, int valoffset, char *buffer, int bufsize)
overflow = 1;
}
else {
- (void) g_strlcpy(bufptr, tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2, value_length), bufend - bufptr + 1);
+ (void) g_strlcpy(bufptr, tvb_format_text(wmem_packet_scope(), tvb, valoffset + 1 + 2 + name_length + 2, value_length), bufend - bufptr + 1);
}
bufptr += strlen(bufptr);
diff --git a/epan/dissectors/packet-isis-clv.c b/epan/dissectors/packet-isis-clv.c
index 6f5e7cf285..2f5c98e488 100644
--- a/epan/dissectors/packet-isis-clv.c
+++ b/epan/dissectors/packet-isis-clv.c
@@ -181,7 +181,7 @@ isis_dissect_authentication_clv(proto_tree *tree, packet_info* pinfo, tvbuff_t *
case 1:
if ( length > 0 ) {
proto_tree_add_bytes_format( tree, hf_auth_bytes, tvb, offset, length,
- NULL, "clear text (1), password (length %d) = %s", length, tvb_format_text(tvb, offset, length));
+ NULL, "clear text (1), password (length %d) = %s", length, tvb_format_text(pinfo->pool, tvb, offset, length));
} else {
proto_tree_add_bytes_format( tree, hf_auth_bytes, tvb, offset, length,
NULL, "clear text (1), no clear-text password found!!!");
diff --git a/epan/dissectors/packet-ismp.c b/epan/dissectors/packet-ismp.c
index 258eb7b8ee..7cd34fadf0 100644
--- a/epan/dissectors/packet-ismp.c
+++ b/epan/dissectors/packet-ismp.c
@@ -454,7 +454,7 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
case EDP_TUPLE_INT_NAME:
proto_tree_add_item(edp_tuples_leaf_tree, hf_ismp_interface_name, tvb, offset, tuple_length, ENC_NA|ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO, ", ifName %s",
- tvb_format_text(tvb, offset, tuple_length));
+ tvb_format_text(pinfo->pool, tvb, offset, tuple_length));
break;
case EDP_TUPLE_SYS_DESCRIPT:
proto_tree_add_item(edp_tuples_leaf_tree, hf_ismp_system_description, tvb, offset, tuple_length, ENC_NA|ENC_ASCII);
diff --git a/epan/dissectors/packet-iua.c b/epan/dissectors/packet-iua.c
index a60e7fd1b9..c4f7d51cba 100644
--- a/epan/dissectors/packet-iua.c
+++ b/epan/dissectors/packet-iua.c
@@ -128,7 +128,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_format_text(parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
+ tvb_format_text(wmem_packet_scope(), parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
}
#define INFO_STRING_OFFSET PARAMETER_VALUE_OFFSET
@@ -141,7 +141,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_format_text(parameter_tvb, INFO_STRING_OFFSET, info_string_length));
+ tvb_format_text(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length));
}
#define DLCI_SAPI_LENGTH 1
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c
index f5b55c9760..14e6f0704c 100644
--- a/epan/dissectors/packet-jxta.c
+++ b/epan/dissectors/packet-jxta.c
@@ -1095,7 +1095,7 @@ static int dissect_jxta_message_framing(tvbuff_t * tvb, packet_info * pinfo, pro
*/
if (headernamelen > 0) {
proto_item_append_text(framing_header_tree_item, " \"%s\"",
- tvb_format_text(tvb, tree_offset + 1, headernamelen));
+ tvb_format_text(pinfo->pool, tvb, tree_offset + 1, headernamelen));
}
tree_offset += 1 + headernamelen;
@@ -1646,7 +1646,7 @@ static int dissect_jxta_message_element_1(tvbuff_t * tvb, packet_info * pinfo, p
tree_offset += 1;
name_len = tvb_get_ntohs(tvb, tree_offset);
- proto_item_append_text(jxta_elem_tree_item, " \"%s\"", tvb_format_text(tvb, tree_offset + 2, name_len));
+ proto_item_append_text(jxta_elem_tree_item, " \"%s\"", tvb_format_text(pinfo->pool, tvb, tree_offset + 2, name_len));
proto_tree_add_item(jxta_elem_tree, hf_jxta_element_name, tvb, tree_offset, 2, ENC_ASCII|ENC_BIG_ENDIAN);
tree_offset += 2 + name_len;
@@ -1921,7 +1921,7 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
} else {
/* literal name */
guint16 name_len = tvb_get_ntohs(tvb, tree_offset);
- proto_item_append_text(jxta_elem_tree_item, " \"%s\"", tvb_format_text(tvb, tree_offset + 2, name_len));
+ proto_item_append_text(jxta_elem_tree_item, " \"%s\"", tvb_format_text(pinfo->pool, tvb, tree_offset + 2, name_len));
proto_tree_add_item(jxta_elem_tree, hf_jxta_element_name, tvb, tree_offset, 2, ENC_ASCII|ENC_BIG_ENDIAN);
tree_offset += 2 + name_len;
}
diff --git a/epan/dissectors/packet-kismet.c b/epan/dissectors/packet-kismet.c
index 6a81ec8b41..841d6084cf 100644
--- a/epan/dissectors/packet-kismet.c
+++ b/epan/dissectors/packet-kismet.c
@@ -150,7 +150,7 @@ dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * da
*/
reqresp_tree = proto_tree_add_subtree(kismet_tree, tvb, offset,
next_offset - offset, ett_kismet_reqresp, NULL,
- tvb_format_text(tvb, offset,
+ tvb_format_text(pinfo->pool, tvb, offset,
next_offset - offset - 1));
tokenlen = get_token_len(line, line + linelen, &next_token);
if (tokenlen != 0) {
diff --git a/epan/dissectors/packet-l1-events.c b/epan/dissectors/packet-l1-events.c
index 3397df5c83..d34f09ae8a 100644
--- a/epan/dissectors/packet-l1-events.c
+++ b/epan/dissectors/packet-l1-events.c
@@ -46,7 +46,7 @@ dissect_l1_events(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
pinfo->pseudo_header->l1event.uton? "TE" : "NT");
len = tvb_find_line_end(tvb, 0, -1, &next_offset, FALSE);
if(len>0)
- col_add_str(pinfo->cinfo, COL_INFO, tvb_format_text(tvb, 0, len));
+ col_add_str(pinfo->cinfo, COL_INFO, tvb_format_text(pinfo->pool, tvb, 0, len));
if (tree) {
ti = proto_tree_add_item(tree, proto_l1_events,
diff --git a/epan/dissectors/packet-ldss.c b/epan/dissectors/packet-ldss.c
index a5c40aa81d..0af309e6a1 100644
--- a/epan/dissectors/packet-ldss.c
+++ b/epan/dissectors/packet-ldss.c
@@ -496,7 +496,7 @@ dissect_ldss_transfer (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
line_tree = proto_tree_add_subtree(ldss_tree, tvb, offset, linelen,
ett_ldss_transfer_req, NULL,
- tvb_format_text(tvb, offset, next_offset-offset));
+ tvb_format_text(pinfo->pool, tvb, offset, next_offset-offset));
if (strncmp(line,"md5:",4)==0) {
digest_type_len = 4;
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c
index dd0bfd3fb3..29d0308aff 100644
--- a/epan/dissectors/packet-lldp.c
+++ b/epan/dissectors/packet-lldp.c
@@ -1523,20 +1523,20 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
{
case 2: /* Interface alias */
idType="IA";
- strPtr = tvb_format_stringzpad(tvb, offset, (dataLen - 1));
+ strPtr = tvb_format_stringzpad(pinfo->pool, tvb, offset, (dataLen - 1));
break;
case 6: /* Interfae name */
idType="IN";
- strPtr = tvb_format_stringzpad(tvb, offset, (dataLen - 1));
+ strPtr = tvb_format_stringzpad(pinfo->pool, tvb, offset, (dataLen - 1));
break;
case 7: /* Locally assigned */
idType="LA";
- strPtr = tvb_format_stringzpad(tvb, offset, (dataLen-1));
+ strPtr = tvb_format_stringzpad(pinfo->pool, tvb, offset, (dataLen-1));
pn_lldp_column_info->chassis_id_locally_assigned = wmem_strdup(pinfo->pool, strPtr);
break;
case 1: /* Chassis component */
idType="CC";
- strPtr = tvb_format_stringzpad(tvb, offset, (dataLen - 1));
+ strPtr = tvb_format_stringzpad(pinfo->pool, tvb, offset, (dataLen - 1));
break;
case 3: /* Port component */
idType="PC";
@@ -1694,7 +1694,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3
{
case 1: /* Interface alias */
idType = "IA";
- strPtr = tvb_format_stringzpad(tvb, offset, (dataLen - 1));
+ strPtr = tvb_format_stringzpad(pinfo->pool, tvb, offset, (dataLen - 1));
break;
case 2: /* Port component */
idType = "PC";
@@ -1702,15 +1702,15 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3
break;
case 5: /* Interface name */
idType = "IN";
- strPtr = tvb_format_stringzpad(tvb, offset, (dataLen - 1));
+ strPtr = tvb_format_stringzpad(pinfo->pool, tvb, offset, (dataLen - 1));
break;
case 6: /* Agent circuit ID */
idType = "AC";
- strPtr = tvb_format_stringzpad(tvb, offset, (dataLen - 1));
+ strPtr = tvb_format_stringzpad(pinfo->pool, tvb, offset, (dataLen - 1));
break;
case 7: /* Locally assigned */
idType = "LA";
- strPtr = tvb_format_stringzpad(tvb, offset, (dataLen-1));
+ strPtr = tvb_format_stringzpad(pinfo->pool, tvb, offset, (dataLen-1));
pn_lldp_column_info->port_id_locally_assigned = wmem_strdup(pinfo->pool, strPtr);
break;
default:
@@ -1814,7 +1814,7 @@ dissect_lldp_port_desc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
/* Get tlv length */
dataLen = TLV_INFO_LEN(tempShort);
- strPtr = tvb_format_stringzpad(tvb, (offset+2), dataLen);
+ strPtr = tvb_format_stringzpad(pinfo->pool, tvb, (offset+2), dataLen);
/* Set port tree */
port_desc_tree = proto_tree_add_subtree_format(tree, tvb, offset, (dataLen + 2),
@@ -1850,7 +1850,7 @@ dissect_lldp_system_name(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
/* Get tlv length */
dataLen = TLV_INFO_LEN(tempShort);
- strPtr = tvb_format_stringzpad(tvb, (offset+2), dataLen);
+ strPtr = tvb_format_stringzpad(pinfo->pool, tvb, (offset+2), dataLen);
/* Set system name tree */
if (tlvsubType == SYSTEM_NAME_TLV_TYPE) {
diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c
index 64274d88d7..1d1561b62e 100644
--- a/epan/dissectors/packet-lmp.c
+++ b/epan/dissectors/packet-lmp.c
@@ -1459,10 +1459,10 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
tvb, offset2+2, 2, l);
if (l && l <= obj_length - 8) {
proto_item_append_text(lmp_object_tree, " = %s",
- tvb_format_text(tvb, offset2+4, l));
+ tvb_format_text(pinfo->pool, tvb, offset2+4, l));
proto_tree_add_string(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TRACE_LOCAL_MSG],
- tvb, offset2+4, l, tvb_format_text(tvb,
+ tvb, offset2+4, l, tvb_format_text(pinfo->pool, tvb,
offset2+4,l));
}
else
@@ -1482,10 +1482,10 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_LEN],
tvb, offset2+2, 2, l);
proto_item_append_text(lmp_object_tree, " = %s",
- tvb_format_text(tvb, offset2+4, l));
+ tvb_format_text(pinfo->pool, tvb, offset2+4, l));
proto_tree_add_string(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_MSG],
- tvb, offset2+4, l, tvb_format_text(tvb, offset2+4,l));
+ tvb, offset2+4, l, tvb_format_text(pinfo->pool, tvb, offset2+4,l));
break;
default:
diff --git a/epan/dissectors/packet-log3gpp.c b/epan/dissectors/packet-log3gpp.c
index 214ed9d33c..44a227f398 100644
--- a/epan/dissectors/packet-log3gpp.c
+++ b/epan/dissectors/packet-log3gpp.c
@@ -571,8 +571,8 @@ dissect_log3gpp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data
if (prot3gpp_tree) {
proto_tree_add_double_format_value(prot3gpp_tree, hf_log3gpp_timestamp, tvb,
offset, timestamp_length,
- g_ascii_strtod(tvb_format_text(tvb, offset, timestamp_length), NULL),
- "%s", tvb_format_text(tvb, offset, timestamp_length - 1));
+ g_ascii_strtod(tvb_format_text(pinfo->pool, tvb, offset, timestamp_length), NULL),
+ "%s", tvb_format_text(pinfo->pool, tvb, offset, timestamp_length - 1));
}
offset += timestamp_length;
diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c
index 625916d003..fc63f5bb87 100644
--- a/epan/dissectors/packet-lte-rrc.c
+++ b/epan/dissectors/packet-lte-rrc.c
@@ -76982,7 +76982,7 @@ dissect_lte_rrc_AbsoluteTimeInfo_r10(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx
const gchar *str, *hf_str;
proto_tree *subtree;
subtree = proto_item_add_subtree(actx->created_item, ett_lte_rrc_absTimeInfo);
- str = tvb_bcd_dig_to_wmem_packet_str(abs_time_info_tvb, 0, 6, NULL, FALSE);
+ str = tvb_bcd_dig_to_str(actx->pinfo->pool, abs_time_info_tvb, 0, 6, NULL, FALSE);
hf_str = wmem_strdup_printf(actx->pinfo->pool, "%c%c-%c%c-%c%c %c%c:%c%c:%c%c", str[0], str[1],
str[2], str[3], str[4], str[5], str[6], str[7], str[8], str[9], str[10], str[11]);
proto_tree_add_string(subtree, hf_lte_rrc_absolute_time, abs_time_info_tvb, 0, 6, hf_str);
diff --git a/epan/dissectors/packet-m2ua.c b/epan/dissectors/packet-m2ua.c
index 73f73363cf..56bc9a8f6d 100644
--- a/epan/dissectors/packet-m2ua.c
+++ b/epan/dissectors/packet-m2ua.c
@@ -277,7 +277,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_format_text(parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
+ tvb_format_text(wmem_packet_scope(), parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
}
#define INFO_STRING_OFFSET PARAMETER_VALUE_OFFSET
@@ -290,7 +290,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_format_text(parameter_tvb, INFO_STRING_OFFSET, info_string_length));
+ tvb_format_text(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length));
}
#define DIAGNOSTIC_INFO_OFFSET PARAMETER_VALUE_OFFSET
diff --git a/epan/dissectors/packet-m3ua.c b/epan/dissectors/packet-m3ua.c
index aaf166ed2d..5d77723e84 100644
--- a/epan/dissectors/packet-m3ua.c
+++ b/epan/dissectors/packet-m3ua.c
@@ -400,7 +400,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_format_text(parameter_tvb, INFO_STRING_OFFSET, info_string_length));
+ tvb_format_text(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length));
}
#define AFFECTED_MASK_LENGTH 1
diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c
index f93f35f2ec..c13fabee63 100644
--- a/epan/dissectors/packet-megaco.c
+++ b/epan/dissectors/packet-megaco.c
@@ -847,7 +847,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
tvb_current_offset = megaco_tvb_skip_wsp_return(tvb, tvb_current_offset)-1; /* cut last RBRKT */
len = tvb_current_offset - tvb_previous_offset;
- pending_id = (guint)strtoul(tvb_format_text(tvb,tvb_previous_offset,len),NULL,10);
+ pending_id = (guint)strtoul(tvb_format_text(pinfo->pool, tvb,tvb_previous_offset,len),NULL,10);
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "%d TransactionResponseAck", pending_id);
my_proto_tree_add_uint(megaco_tree, hf_megaco_transid, tvb, save_offset, save_length, pending_id);
@@ -872,7 +872,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
tvb_current_offset = megaco_tvb_skip_wsp_return(tvb, tvb_current_offset-1);
len = tvb_current_offset - tvb_offset;
- pending_id = (guint)strtoul(tvb_format_text(tvb,tvb_offset,len),NULL,10);
+ pending_id = (guint)strtoul(tvb_format_text(pinfo->pool, tvb,tvb_offset,len),NULL,10);
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "%d Pending", pending_id);
my_proto_tree_add_uint(megaco_tree, hf_megaco_transid, tvb, save_offset, save_length, pending_id);
@@ -893,7 +893,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
tvb_current_offset = megaco_tvb_skip_wsp_return(tvb, tvb_LBRKT-1);
len = tvb_current_offset - tvb_offset;
- trx_id = (guint)strtoul(tvb_format_text(tvb,tvb_offset,len),NULL,10);
+ trx_id = (guint)strtoul(tvb_format_text(pinfo->pool, tvb,tvb_offset,len),NULL,10);
col_add_fstr(pinfo->cinfo, COL_INFO, "%d Reply ", trx_id);
my_proto_tree_add_uint(megaco_tree, hf_megaco_transid, tvb, save_offset, save_length, trx_id);
@@ -921,7 +921,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
tvb_current_offset = megaco_tvb_skip_wsp_return(tvb, tvb_current_offset-1);
len = tvb_current_offset - tvb_offset;
- trx_id = (guint)strtoul(tvb_format_text(tvb,tvb_offset,len),NULL,10);
+ trx_id = (guint)strtoul(tvb_format_text(pinfo->pool, tvb,tvb_offset,len),NULL,10);
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "%d Request", trx_id);
my_proto_tree_add_uint(megaco_tree, hf_megaco_transid, tvb, save_offset, save_length, trx_id);
@@ -932,7 +932,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
default :
proto_tree_add_expert_format(tree, pinfo, &ei_megaco_error_descriptor_transaction_list, tvb, 0, -1,
"Sorry, can't understand errorDescriptor / transactionList = %s, can't parse it pos %u",
- tvb_format_text(tvb,tvb_previous_offset,2),tvb_previous_offset);
+ tvb_format_text(pinfo->pool, tvb,tvb_previous_offset,2),tvb_previous_offset);
return tvb_captured_length(tvb);
} /* end switch */
/* Only these remains now
@@ -989,7 +989,7 @@ nextcontext:
ctx_id = NULL_CONTEXT;
break;
default:
- ctx_id = (guint)strtoul(tvb_format_text(tvb, tvb_previous_offset, tokenlen),NULL,10);
+ ctx_id = (guint)strtoul(tvb_format_text(pinfo->pool, tvb, tvb_previous_offset, tokenlen),NULL,10);
}
my_proto_tree_add_uint(megaco_tree, hf_megaco_Context, tvb, context_offset, context_length, ctx_id);
@@ -1377,7 +1377,7 @@ nextcontext:
}
}
else{
- gchar* command = tvb_format_text(tvb, tvb_command_start_offset, tokenlen);
+ gchar* command = tvb_format_text(pinfo->pool, tvb, tvb_command_start_offset, tokenlen);
if ( g_str_equal(command,"Subtract") ) {
switch(trx_type) {
@@ -1527,23 +1527,23 @@ nextcontext:
case MEGACO_CMD_PRIORITY:
proto_tree_add_string(megaco_tree_command_line, hf_megaco_priority, tvb,
tvb_offset, tokenlen,
- tvb_format_text(tvb, tvb_offset,
+ tvb_format_text(pinfo->pool, tvb, tvb_offset,
tokenlen));
break;
default:
proto_tree_add_string(megaco_tree_command_line, hf_megaco_termid, tvb,
tvb_offset, tokenlen,
- tvb_format_text(tvb, tvb_offset,
+ tvb_format_text(pinfo->pool, tvb, tvb_offset,
tokenlen));
term->len = tokenlen;
- term->buffer = (const guint8*)(term->str = tvb_format_text(tvb, tvb_offset, tokenlen));
+ term->buffer = (const guint8*)(term->str = tvb_format_text(pinfo->pool, tvb, tvb_offset, tokenlen));
gcp_cmd_add_term(msg, trx, cmd, term, wild_term, pinfo, keep_persistent_data);
break;
}
- col_append_fstr(pinfo->cinfo, COL_INFO, "=%s",tvb_format_text(tvb, tvb_offset,tokenlen));
+ col_append_fstr(pinfo->cinfo, COL_INFO, "=%s",tvb_format_text(pinfo->pool, tvb, tvb_offset,tokenlen));
break;
}
@@ -1662,7 +1662,7 @@ dissect_megaco_modemdescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command_li
tokenlen = (tvb_RBRKT+1) - tvb_previous_offset;
proto_tree_add_string(megaco_tree_command_line, hf_megaco_modem_descriptor, tvb,
tvb_previous_offset, tokenlen,
- tvb_format_text(tvb, tvb_previous_offset,
+ tvb_format_text(wmem_packet_scope(), tvb, tvb_previous_offset,
tokenlen));
}
@@ -1675,7 +1675,7 @@ dissect_megaco_multiplexdescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_comman
tokenlen = (tvb_RBRKT+1) - tvb_previous_offset;
proto_tree_add_string(megaco_tree_command_line, hf_megaco_multiplex_descriptor, tvb,
tvb_previous_offset, tokenlen,
- tvb_format_text(tvb, tvb_previous_offset,
+ tvb_format_text(wmem_packet_scope(), tvb, tvb_previous_offset,
tokenlen));
}
@@ -1798,7 +1798,7 @@ dissect_megaco_mediadescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command_li
tvb_offset = megaco_tvb_skip_wsp_return(tvb, tvb_LBRKT-1);
tokenlen = tvb_offset - tvb_current_offset;
- streamId = (guint)strtoul(tvb_format_text(tvb, tvb_current_offset,tokenlen),NULL,10);
+ streamId = (guint)strtoul(tvb_format_text(pinfo->pool, tvb, tvb_current_offset,tokenlen),NULL,10);
ti = proto_tree_add_uint(megaco_mediadescriptor_tree, hf_megaco_streamid, tvb,
save_offset, 1, streamId);
proto_item_set_len(ti, tvb_offset-save_offset+tokenlen);
@@ -1837,7 +1837,7 @@ dissect_megaco_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *megaco_tree,
{
/*proto_item *item;*/
/*proto_tree *tree;*/
- gchar *msg = tvb_format_text(tvb, offset, len);
+ gchar *msg = tvb_format_text(pinfo->pool, tvb, offset, len);
/*item= */proto_tree_add_item(megaco_tree, hf_megaco_h245, tvb, offset, len, ENC_NA);
/*tree = proto_item_add_subtree(item, ett_megaco_h245); */
@@ -2022,7 +2022,7 @@ dissect_megaco_eventsdescriptor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *m
ti = proto_tree_add_uint(megaco_eventsdescriptor_tree, hf_megaco_requestid, tvb,
tvb_current_offset, 1,
- (guint32) strtoul(tvb_format_text(tvb, tvb_current_offset, tokenlen), NULL, 10));
+ (guint32) strtoul(tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen), NULL, 10));
proto_item_set_len(ti, tokenlen);
tvb_events_end_offset = tvb_RBRKT;
@@ -2164,7 +2164,7 @@ dissect_megaco_signaldescriptor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *m
tvb_current_offset = tvb_LBRKT;
tvb_next_offset = megaco_tvb_skip_wsp(tvb, tvb_current_offset+1);
- col_append_fstr(pinfo->cinfo, COL_INFO, " (Signal:%s)",tvb_format_text(tvb, tvb_current_offset,tokenlen-tvb_current_offset+tvb_previous_offset));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (Signal:%s)",tvb_format_text(pinfo->pool, tvb, tvb_current_offset,tokenlen-tvb_current_offset+tvb_previous_offset));
if ( tvb_current_offset < tvb_signals_end_offset && tvb_current_offset != -1 && tvb_next_offset != tvb_signals_end_offset){
@@ -2488,7 +2488,7 @@ dissect_megaco_servicechangedescriptor(tvbuff_t *tvb, packet_info* pinfo, proto_
tokenlen = (tvb_RBRKT+1) - tvb_previous_offset;
proto_tree_add_string(megaco_tree_command_line, hf_megaco_servicechange_descriptor, tvb,
tvb_previous_offset, tokenlen,
- tvb_format_text(tvb, tvb_previous_offset,
+ tvb_format_text(pinfo->pool, tvb, tvb_previous_offset,
tokenlen));
*/
proto_tree_add_format_text(megaco_tree, tvb, tvb_RBRKT, 1);
@@ -2503,7 +2503,7 @@ dissect_megaco_digitmapdescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command
tokenlen = tvb_RBRKT - tvb_previous_offset;
proto_tree_add_string(megaco_tree_command_line, hf_megaco_digitmap_descriptor, tvb,
tvb_previous_offset, tokenlen,
- tvb_format_text(tvb, tvb_previous_offset,
+ tvb_format_text(wmem_packet_scope(), tvb, tvb_previous_offset,
tokenlen));
}
@@ -2573,7 +2573,7 @@ dissect_megaco_observedeventsdescriptor(tvbuff_t *tvb, packet_info *pinfo, proto
ti = proto_tree_add_uint(megaco_observedeventsdescriptor_tree, hf_megaco_requestid, tvb,
tvb_current_offset, 1,
- (guint32) strtoul(tvb_format_text(tvb, tvb_current_offset, tokenlen), NULL, 10));
+ (guint32) strtoul(tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen), NULL, 10));
proto_item_set_len(ti, tokenlen);
tvb_observedevents_end_offset = tvb_RBRKT;
@@ -2734,7 +2734,7 @@ dissect_megaco_Packagesdescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command
ti = proto_tree_add_uint(megaco_packagesdescriptor_tree, hf_megaco_requestid, tvb,
tvb_current_offset, 1,
- (guint32) strtoul(tvb_format_text(tvb, tvb_current_offset, tokenlen), NULL, 10));
+ (guint32) strtoul(tvb_format_text(wmem_packet_scope(), tvb, tvb_current_offset, tokenlen), NULL, 10));
proto_item_set_len(ti, tokenlen);
tvb_packages_end_offset = tvb_RBRKT;
@@ -2962,7 +2962,7 @@ dissect_megaco_TerminationStatedescriptor(tvbuff_t *tvb, proto_tree *megaco_medi
proto_tree_add_string(megaco_TerminationState_tree, hf_megaco_Service_State, tvb,
tvb_current_offset, tokenlen,
- tvb_format_text(tvb, tvb_current_offset,
+ tvb_format_text(wmem_packet_scope(), tvb, tvb_current_offset,
tokenlen));
break;
@@ -2978,7 +2978,7 @@ dissect_megaco_TerminationStatedescriptor(tvbuff_t *tvb, proto_tree *megaco_medi
proto_tree_add_string(megaco_TerminationState_tree, hf_megaco_Event_Buffer_Control, tvb,
tvb_current_offset, tokenlen,
- tvb_format_text(tvb, tvb_current_offset,
+ tvb_format_text(wmem_packet_scope(), tvb, tvb_current_offset,
tokenlen));
break;
@@ -2993,7 +2993,7 @@ dissect_megaco_TerminationStatedescriptor(tvbuff_t *tvb, proto_tree *megaco_medi
proto_tree_add_string(megaco_TerminationState_tree, hf_megaco_Event_Buffer_Control, tvb,
tvb_current_offset, tokenlen,
- tvb_format_text(tvb, tvb_current_offset,
+ tvb_format_text(wmem_packet_scope(), tvb, tvb_current_offset,
tokenlen));
break;
@@ -3209,34 +3209,34 @@ dissect_megaco_LocalControldescriptor(tvbuff_t *tvb, proto_tree *megaco_mediades
case MEGACO_MODETOKEN: /* Mode */
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_mode, tvb,
tvb_help_offset, tvb_offset-tvb_help_offset,
- tvb_format_text(tvb, tvb_current_offset,
+ tvb_format_text(pinfo->pool, tvb, tvb_current_offset,
tokenlen));
- col_append_fstr(pinfo->cinfo, COL_INFO, " (Mode:%s)",tvb_format_text(tvb, tvb_current_offset,tokenlen));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (Mode:%s)",tvb_format_text(pinfo->pool, tvb, tvb_current_offset,tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_RESERVEDVALUETOKEN: /* ReservedValue */
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_reserve_value, tvb,
tvb_help_offset, tvb_offset-tvb_help_offset,
- tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_RESERVEDGROUPTOKEN: /* ReservedGroup */
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_reserve_group, tvb,
tvb_help_offset, tvb_offset-tvb_help_offset,
- tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_H324_H223CAPR: /* h324/h223capr */
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_h324_h223capr, tvb,
tvb_help_offset, tvb_offset-tvb_help_offset,
- tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
tokenlen = tvb_offset - tvb_help_offset;
- msg=tvb_format_text(tvb,tvb_help_offset, tokenlen);
+ msg=tvb_format_text(pinfo->pool, tvb,tvb_help_offset, tokenlen);
dissect_megaco_h324_h223caprn(tvb, pinfo, megaco_mediadescriptor_tree, tvb_help_offset, tokenlen, msg);
break;
@@ -3245,7 +3245,7 @@ dissect_megaco_LocalControldescriptor(tvbuff_t *tvb, proto_tree *megaco_mediades
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_h324_muxtbl_in, tvb,
tvb_help_offset, tvb_offset-tvb_help_offset,
- tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
@@ -3259,7 +3259,7 @@ dissect_megaco_LocalControldescriptor(tvbuff_t *tvb, proto_tree *megaco_mediades
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_h324_muxtbl_out, tvb,
tvb_current_offset, tokenlen,
- tvb_format_text(tvb, tvb_current_offset,
+ tvb_format_text(pinfo->pool, tvb, tvb_current_offset,
tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
@@ -3280,37 +3280,37 @@ dissect_megaco_LocalControldescriptor(tvbuff_t *tvb, proto_tree *megaco_mediades
case MEGACO_GM_SAF:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_gm_saf, tvb,
- tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_GM_SAM:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_gm_sam, tvb,
- tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_GM_SPF:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_gm_spf, tvb,
- tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_GM_SPR:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_gm_spr, tvb,
- tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_GM_ESAS:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_gm_esas, tvb,
- tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_GM_RSB:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_gm_rsb, tvb,
- tvb_help_offset, tvb_offset - tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset - tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset + 1);
break;
case MEGACO_TMAN_POL:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_tman_pol, tvb,
- tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_TMAN_SDR:
@@ -3319,7 +3319,7 @@ dissect_megaco_LocalControldescriptor(tvbuff_t *tvb, proto_tree *megaco_mediades
gboolean sdr_valid;
proto_item* pi;
- sdr_valid = ws_strtoi32(tvb_format_text(tvb, tvb_current_offset, tokenlen), NULL, &sdr);
+ sdr_valid = ws_strtoi32(tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen), NULL, &sdr);
pi =proto_tree_add_int(megaco_LocalControl_tree, hf_megaco_tman_sdr, tvb, tvb_help_offset,
tvb_offset - tvb_help_offset, sdr);
proto_item_append_text(pi, " [%i b/s]", sdr*8);
@@ -3331,22 +3331,22 @@ dissect_megaco_LocalControldescriptor(tvbuff_t *tvb, proto_tree *megaco_mediades
break;
case MEGACO_TMAN_MBS:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_tman_mbs, tvb,
- tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_TMAN_PDR:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_tman_pdr, tvb,
- tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_TMAN_DVT:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_tman_dvt, tvb,
- tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
case MEGACO_IPDC_REALM:
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_ipdc_realm, tvb,
- tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(tvb, tvb_current_offset, tokenlen));
+ tvb_help_offset, tvb_offset-tvb_help_offset, tvb_format_text(pinfo->pool, tvb, tvb_current_offset, tokenlen));
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_offset +1);
break;
diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c
index 70aedf0524..f25e8e9bcc 100644
--- a/epan/dissectors/packet-mgcp.c
+++ b/epan/dissectors/packet-mgcp.c
@@ -530,7 +530,7 @@ static int dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
sectionlen = tvb_find_line_end(tvb, tvb_sectionbegin, -1,
&tvb_sectionend, FALSE);
col_prepend_fstr(pinfo->cinfo, COL_INFO, "%s",
- tvb_format_text(tvb, tvb_sectionbegin, sectionlen));
+ tvb_format_text(pinfo->pool, tvb, tvb_sectionbegin, sectionlen));
return tvb_len;
}
@@ -1164,7 +1164,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
return;
}
- code = tvb_format_text(tvb, tvb_previous_offset, tokenlen);
+ code = tvb_format_text(pinfo->pool, tvb, tvb_previous_offset, tokenlen);
(void) g_strlcpy(mi->code, code, 5);
if (is_mgcp_verb(tvb, tvb_previous_offset, tvb_current_len, &verb_description))
{
@@ -1198,7 +1198,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
if (tokennum == 1)
{
- transid = tvb_format_text(tvb, tvb_previous_offset, tokenlen);
+ transid = tvb_format_text(pinfo->pool, tvb, tvb_previous_offset, tokenlen);
/* XXX - what if this isn't a valid text string? */
mi->transid = (guint32)strtoul(transid, NULL, 10);
proto_tree_add_string(tree, hf_mgcp_transid, tvb,
@@ -1208,7 +1208,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
{
if (mgcp_type == MGCP_REQUEST)
{
- endpointId = tvb_format_text(tvb, tvb_previous_offset, tokenlen);
+ endpointId = tvb_format_text(pinfo->pool, tvb, tvb_previous_offset, tokenlen);
mi->endpointId = wmem_strdup(wmem_packet_scope(), endpointId);
proto_tree_add_string(tree, hf_mgcp_req_endpoint, tvb,
tvb_previous_offset, tokenlen, endpointId);
@@ -1227,7 +1227,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
proto_tree_add_string(tree, hf_mgcp_rsp_rspstring, tvb,
tvb_previous_offset, tokenlen,
- tvb_format_text(tvb, tvb_previous_offset,
+ tvb_format_text(pinfo->pool, tvb, tvb_previous_offset,
tokenlen));
break;
}
@@ -1246,7 +1246,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
proto_tree_add_string(tree, hf_mgcp_version, tvb,
tvb_previous_offset, tokenlen,
- tvb_format_text(tvb, tvb_previous_offset,
+ tvb_format_text(pinfo->pool, tvb, tvb_previous_offset,
tokenlen));
break;
}
@@ -1558,7 +1558,7 @@ static void dissect_mgcp_params(tvbuff_t *tvb, proto_tree *tree, mgcp_info_t* mi
tokenlen = tvb_find_line_end(tvb, tvb_tokenbegin, -1, &tvb_lineend, FALSE);
proto_tree_add_string(mgcp_param_tree, *my_param, tvb,
tvb_linebegin, linelen,
- tvb_format_text(tvb, tvb_tokenbegin, tokenlen));
+ tvb_format_text(wmem_packet_scope(), tvb, tvb_tokenbegin, tokenlen));
}
}
diff --git a/epan/dissectors/packet-msrp.c b/epan/dissectors/packet-msrp.c
index 5714baa2ba..c357379586 100644
--- a/epan/dissectors/packet-msrp.c
+++ b/epan/dissectors/packet-msrp.c
@@ -526,20 +526,20 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MSRP");
if (is_msrp_response){
col_add_fstr(pinfo->cinfo, COL_INFO, "Response: %s ",
- tvb_format_text(tvb, token_3_start, token_3_len));
+ tvb_format_text(pinfo->pool, tvb, token_3_start, token_3_len));
if (token_4_len )
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
- tvb_format_text(tvb, token_4_start, token_4_len));
+ tvb_format_text(pinfo->pool, tvb, token_4_start, token_4_len));
col_append_fstr(pinfo->cinfo, COL_INFO, "Transaction ID: %s",
- tvb_format_text(tvb, token_2_start, token_2_len));
+ tvb_format_text(pinfo->pool, tvb, token_2_start, token_2_len));
}else{
col_add_fstr(pinfo->cinfo, COL_INFO, "Request: %s ",
- tvb_format_text(tvb, token_3_start, token_3_len));
+ tvb_format_text(pinfo->pool, tvb, token_3_start, token_3_len));
col_append_fstr(pinfo->cinfo, COL_INFO, "Transaction ID: %s",
- tvb_format_text(tvb, token_2_start, token_2_len));
+ tvb_format_text(pinfo->pool, tvb, token_2_start, token_2_len));
}
if (tree) {
@@ -597,7 +597,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
/*
* Malformed header - no colon after the name.
*/
- hdr_str = tvb_format_text(tvb, offset, linelen);
+ hdr_str = tvb_format_text(pinfo->pool, tvb, offset, linelen);
proto_tree_add_string_format(msrp_hdr_tree, hf_msrp_hdr, tvb, offset,
next_offset - offset, hdr_str, "%s", hdr_str);
} else {
@@ -605,7 +605,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
hf_index = msrp_is_known_msrp_header(tvb, offset, header_len);
if (hf_index == -1) {
- hdr_str = tvb_format_text(tvb, offset, linelen);
+ hdr_str = tvb_format_text(pinfo->pool, tvb, offset, linelen);
proto_tree_add_string_format(msrp_hdr_tree, hf_msrp_hdr, tvb,
offset, next_offset - offset, hdr_str, "%s", hdr_str);
} else {
@@ -632,7 +632,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
hf_header_array[hf_index], tvb,
offset, next_offset - offset,
value, "%s",
- tvb_format_text(tvb, offset, linelen));
+ tvb_format_text(pinfo->pool, tvb, offset, linelen));
switch ( hf_index ) {
diff --git a/epan/dissectors/packet-multipart.c b/epan/dissectors/packet-multipart.c
index f8a76929f1..40e75a395b 100644
--- a/epan/dissectors/packet-multipart.c
+++ b/epan/dissectors/packet-multipart.c
@@ -631,7 +631,7 @@ process_body_part(proto_tree *tree, tvbuff_t *tvb,
hf_header_array[hf_index], tvb,
offset, next_offset - offset,
(const char *)value_str, "%s",
- tvb_format_text(tvb, offset, next_offset - offset));
+ tvb_format_text(pinfo->pool, tvb, offset, next_offset - offset));
switch (hf_index) {
case POS_ORIGINALCONTENT:
diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c
index 715df6ebcb..dd251ebfc8 100644
--- a/epan/dissectors/packet-mysql.c
+++ b/epan/dissectors/packet-mysql.c
@@ -1431,7 +1431,7 @@ mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset,
}
col_append_fstr(pinfo->cinfo, COL_INFO, " version=%s ",
- tvb_format_text(tvb, conn_data->is_mariadb_server ? offset + 6 : offset, conn_data->is_mariadb_server ? lenstr - 7 : lenstr-1));
+ tvb_format_text(pinfo->pool, tvb, conn_data->is_mariadb_server ? offset + 6 : offset, conn_data->is_mariadb_server ? lenstr - 7 : lenstr-1));
col_set_fence(pinfo->cinfo, COL_INFO);
proto_tree_add_item(greeting_tree, hf_mysql_version, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
@@ -1599,7 +1599,7 @@ mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset,
/* User name */
lenstr = my_tvb_strsize(tvb, offset);
col_append_fstr(pinfo->cinfo, COL_INFO, " user=%s ",
- tvb_format_text(tvb, offset, lenstr-1));
+ tvb_format_text(pinfo->pool, tvb, offset, lenstr-1));
proto_tree_add_item(login_tree, hf_mysql_user, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
offset += lenstr;
@@ -1630,7 +1630,7 @@ mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset,
}
col_append_fstr(pinfo->cinfo, COL_INFO, "db=%s ",
- tvb_format_text(tvb, offset, lenstr-1));
+ tvb_format_text(pinfo->pool, tvb, offset, lenstr-1));
col_set_fence(pinfo->cinfo, COL_INFO);
proto_tree_add_item(login_tree, hf_mysql_schema, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
@@ -1891,7 +1891,7 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *
proto_tree_add_item(req_tree, hf_mysql_query, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
if (mysql_showquery) {
col_append_fstr(pinfo->cinfo, COL_INFO, " { %s } ",
- tvb_format_text(tvb, offset, lenstr));
+ tvb_format_text(pinfo->pool, tvb, offset, lenstr));
col_set_fence(pinfo->cinfo, COL_INFO);
}
offset += lenstr;
diff --git a/epan/dissectors/packet-nas_5gs.c b/epan/dissectors/packet-nas_5gs.c
index 4b472fa55a..b7b4ea7c25 100644
--- a/epan/dissectors/packet-nas_5gs.c
+++ b/epan/dissectors/packet-nas_5gs.c
@@ -1039,7 +1039,7 @@ de_nas_5gs_mm_5gs_mobile_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
/* Routing indicator octet 8-9 */
new_tvb = tvb_new_subset_length(tvb, offset, 2);
- route_id_str = tvb_bcd_dig_to_wmem_packet_str(new_tvb, 0, (tvb_get_guint8(new_tvb, 1) == 0xff) ? 1 : 2, NULL, FALSE);
+ route_id_str = tvb_bcd_dig_to_str(pinfo->pool, new_tvb, 0, (tvb_get_guint8(new_tvb, 1) == 0xff) ? 1 : 2, NULL, FALSE);
proto_tree_add_string(tree, hf_nas_5gs_mm_routing_indicator, new_tvb, 0, -1, route_id_str);
offset += 2;
/* Protection scheme id octet 10 */
diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c
index dff038cab0..00784bee3a 100644
--- a/epan/dissectors/packet-netflow.c
+++ b/epan/dissectors/packet-netflow.c
@@ -8099,7 +8099,7 @@ dissect_v9_v10_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdutree,
case VENDOR_CACE << 16 | 10: /* caceLocalProcessUserName */
uname_len = tvb_get_guint8(tvb, offset);
- uname_str = tvb_format_text(tvb, offset+1, uname_len);
+ uname_str = tvb_format_text(pinfo->pool, tvb, offset+1, uname_len);
proto_tree_add_item(pdutree, hf_pie_cace_local_username_len,
tvb, offset, 1, ENC_BIG_ENDIAN);
ti = proto_tree_add_string(pdutree, hf_pie_cace_local_username,
@@ -8110,7 +8110,7 @@ dissect_v9_v10_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdutree,
case VENDOR_CACE << 16 | 11: /* caceLocalProcessCommand */
cmd_len = tvb_get_guint8(tvb, offset);
- cmd_str = tvb_format_text(tvb, offset+1, cmd_len);
+ cmd_str = tvb_format_text(pinfo->pool, tvb, offset+1, cmd_len);
proto_tree_add_item(pdutree, hf_pie_cace_local_cmd_len,
tvb, offset, 1, ENC_BIG_ENDIAN);
ti = proto_tree_add_string(pdutree, hf_pie_cace_local_cmd,
@@ -10116,17 +10116,17 @@ dissect_v9_v10_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdutree,
tvb, offset, length, ENC_BIG_ENDIAN);
break;
case ((VENDOR_PLIXER << 16) | 101): /* client_hostname */
- gen_str = tvb_format_text(tvb, offset, length);
+ gen_str = tvb_format_text(pinfo->pool, tvb, offset, length);
ti = proto_tree_add_string(pdutree, hf_pie_plixer_client_hostname,
tvb, offset, length, gen_str);
break;
case ((VENDOR_PLIXER << 16) | 102): /* partner_name */
- gen_str = tvb_format_text(tvb, offset, length);
+ gen_str = tvb_format_text(pinfo->pool, tvb, offset, length);
ti = proto_tree_add_string(pdutree, hf_pie_plixer_partner_name,
tvb, offset, length, gen_str);
break;
case ((VENDOR_PLIXER << 16) | 103): /* server_hostname */
- gen_str = tvb_format_text(tvb, offset, length);
+ gen_str = tvb_format_text(pinfo->pool, tvb, offset, length);
ti = proto_tree_add_string(pdutree, hf_pie_plixer_server_hostname,
tvb, offset, length, gen_str);
break;
@@ -10135,7 +10135,7 @@ dissect_v9_v10_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdutree,
tvb, offset, length, ENC_BIG_ENDIAN);
break;
case ((VENDOR_PLIXER << 16) | 105): /* recipient_address */
- gen_str = tvb_format_text(tvb, offset, length);
+ gen_str = tvb_format_text(pinfo->pool, tvb, offset, length);
ti = proto_tree_add_string(pdutree, hf_pie_plixer_recipient_address,
tvb, offset, length, gen_str);
break;
@@ -10144,7 +10144,7 @@ dissect_v9_v10_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdutree,
tvb, offset, length, ENC_BIG_ENDIAN);
break;
case ((VENDOR_PLIXER << 16) | 107): /* msgid */
- gen_str = tvb_format_text(tvb, offset, length);
+ gen_str = tvb_format_text(pinfo->pool, tvb, offset, length);
ti = proto_tree_add_string(pdutree, hf_pie_plixer_msgid,
tvb, offset, length, gen_str);
break;
@@ -10170,22 +10170,22 @@ dissect_v9_v10_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdutree,
tvb, offset, length, ENC_BIG_ENDIAN);
break;
case ((VENDOR_PLIXER << 16) | 113): /* service_version */
- gen_str = tvb_format_text(tvb, offset, length);
+ gen_str = tvb_format_text(pinfo->pool, tvb, offset, length);
ti = proto_tree_add_string(pdutree, hf_pie_plixer_service_version,
tvb, offset, length, gen_str);
break;
case ((VENDOR_PLIXER << 16) | 114): /* linked_msgid */
- gen_str = tvb_format_text(tvb, offset, length);
+ gen_str = tvb_format_text(pinfo->pool, tvb, offset, length);
ti = proto_tree_add_string(pdutree, hf_pie_plixer_linked_msgid,
tvb, offset, length, gen_str);
break;
case ((VENDOR_PLIXER << 16) | 115): /* message_subject */
- gen_str = tvb_format_text(tvb, offset, length);
+ gen_str = tvb_format_text(pinfo->pool, tvb, offset, length);
ti = proto_tree_add_string(pdutree, hf_pie_plixer_message_subject,
tvb, offset, length, gen_str);
break;
case ((VENDOR_PLIXER << 16) | 116): /* sender_address */
- gen_str = tvb_format_text(tvb, offset, length);
+ gen_str = tvb_format_text(pinfo->pool, tvb, offset, length);
ti = proto_tree_add_string(pdutree, hf_pie_plixer_sender_address,
tvb, offset, length, gen_str);
break;
diff --git a/epan/dissectors/packet-nntp.c b/epan/dissectors/packet-nntp.c
index f1ac53a8ed..8c20fb1cfa 100644
--- a/epan/dissectors/packet-nntp.c
+++ b/epan/dissectors/packet-nntp.c
@@ -51,7 +51,7 @@ dissect_nntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
*/
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", type,
- tvb_format_text(tvb, offset, linelen));
+ tvb_format_text(pinfo->pool, tvb, offset, linelen));
if (tree) {
ti = proto_tree_add_item(tree, proto_nntp, tvb, offset, -1,
diff --git a/epan/dissectors/packet-nr-rrc.c b/epan/dissectors/packet-nr-rrc.c
index 0dcae2adea..2a155d9312 100644
--- a/epan/dissectors/packet-nr-rrc.c
+++ b/epan/dissectors/packet-nr-rrc.c
@@ -38947,7 +38947,7 @@ dissect_nr_rrc_AbsoluteTimeInfo_r16(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
const gchar *str, *hf_str;
proto_tree *subtree;
subtree = proto_item_add_subtree(actx->created_item, ett_nr_rrc_absTimeInfo);
- str = tvb_bcd_dig_to_wmem_packet_str(abs_time_info_tvb, 0, 6, NULL, FALSE);
+ str = tvb_bcd_dig_to_str(actx->pinfo->pool, abs_time_info_tvb, 0, 6, NULL, FALSE);
hf_str = wmem_strdup_printf(actx->pinfo->pool, "%c%c-%c%c-%c%c %c%c:%c%c:%c%c", str[0], str[1],
str[2], str[3], str[4], str[5], str[6], str[7], str[8], str[9], str[10], str[11]);
proto_tree_add_string(subtree, hf_nr_rrc_absolute_time, abs_time_info_tvb, 0, 6, hf_str);
diff --git a/epan/dissectors/packet-p1.c b/epan/dissectors/packet-p1.c
index 767bad6318..3604f88fc2 100644
--- a/epan/dissectors/packet-p1.c
+++ b/epan/dissectors/packet-p1.c
@@ -973,7 +973,7 @@ static void do_address(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx)
wmem_strbuf_append(ctx->oraddress, addr);
}
if (tvb_string) {
- wmem_strbuf_append(ctx->oraddress, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string)));
+ wmem_strbuf_append(ctx->oraddress, tvb_format_text(actx->pinfo->pool, tvb_string, 0, tvb_captured_length(tvb_string)));
}
}
}
@@ -986,7 +986,7 @@ static void do_address_str(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* a
do_address(addr, tvb_string, actx);
if (ctx && ctx->do_address && ddatype && tvb_string)
- wmem_strbuf_append(ddatype, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string)));
+ wmem_strbuf_append(ddatype, tvb_format_text(actx->pinfo->pool, tvb_string, 0, tvb_captured_length(tvb_string)));
}
static void do_address_str_tree(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx, proto_tree* tree)
@@ -998,7 +998,7 @@ static void do_address_str_tree(const char* addr, tvbuff_t* tvb_string, asn1_ctx
if (ctx && ctx->do_address && tvb_string && ddatype) {
if (wmem_strbuf_get_len(ddatype) > 0) {
- proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string)));
+ proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(actx->pinfo->pool, tvb_string, 0, tvb_captured_length(tvb_string)));
}
}
}
@@ -1029,10 +1029,10 @@ dissect_p1_MTAName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
if (ctx && ctx->do_address) {
- proto_item_append_text(actx->subtree.tree, " %s", tvb_format_text(mtaname, 0, tvb_reported_length(mtaname)));
+ proto_item_append_text(actx->subtree.tree, " %s", tvb_format_text(actx->pinfo->pool, mtaname, 0, tvb_reported_length(mtaname)));
} else {
if (mtaname) {
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", tvb_format_text(mtaname, 0, tvb_reported_length(mtaname)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", tvb_format_text(actx->pinfo->pool, mtaname, 0, tvb_reported_length(mtaname)));
}
}
@@ -1764,10 +1764,10 @@ dissect_p1_LocalIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
if(id) {
if (ctx && ctx->do_address)
- proto_item_append_text(actx->subtree.tree, " $ %s)", tvb_format_text(id, 0, tvb_reported_length(id)));
+ proto_item_append_text(actx->subtree.tree, " $ %s)", tvb_format_text(actx->pinfo->pool, id, 0, tvb_reported_length(id)));
if (hf_index == hf_p1_subject_identifier)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %s)", tvb_format_text(id, 0, tvb_reported_length(id)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %s)", tvb_format_text(actx->pinfo->pool, id, 0, tvb_reported_length(id)));
}
@@ -2772,7 +2772,7 @@ dissect_p1_Time(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, as
if(arrival && ctx && ctx->do_address)
- proto_item_append_text(actx->subtree.tree, " %s", tvb_format_text(arrival, 0, tvb_reported_length(arrival)));
+ proto_item_append_text(actx->subtree.tree, " %s", tvb_format_text(actx->pinfo->pool, arrival, 0, tvb_reported_length(arrival)));
diff --git a/epan/dissectors/packet-pop.c b/epan/dissectors/packet-pop.c
index 61511c0dc6..f7af76c1d1 100644
--- a/epan/dissectors/packet-pop.c
+++ b/epan/dissectors/packet-pop.c
@@ -262,7 +262,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
tvb, offset,
next_offset - offset,
"", "%s",
- tvb_format_text(tvb, offset, next_offset - offset));
+ tvb_format_text(pinfo->pool, tvb, offset, next_offset - offset));
reqresp_tree = proto_item_add_subtree(ti, ett_pop_reqresp);
/*
@@ -379,7 +379,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
tvb, offset,
next_offset - offset,
"", "%s",
- tvb_format_text(tvb, offset, next_offset - offset));
+ tvb_format_text(pinfo->pool, tvb, offset, next_offset - offset));
offset = next_offset;
}
return tvb_captured_length(tvb);
diff --git a/epan/dissectors/packet-ppi-antenna.c b/epan/dissectors/packet-ppi-antenna.c
index e11161ffd8..2f68ddc2c8 100644
--- a/epan/dissectors/packet-ppi-antenna.c
+++ b/epan/dissectors/packet-ppi-antenna.c
@@ -270,7 +270,7 @@ dissect_ppi_antenna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
break;
if (tree) {
/* proto_tree_add_item(ppi_antenna_tree, hf_ppi_antenna_modelname, tvb, offset, 32, ENC_ASCII|ENC_NA); */
- curr_str = tvb_format_stringzpad(tvb, offset, 32);
+ curr_str = tvb_format_stringzpad(pinfo->pool, tvb, offset, 32);
proto_tree_add_string(ppi_antenna_tree, hf_ppi_antenna_modelname, tvb, offset, 32, curr_str);
proto_item_append_text(antenna_line, " (%s)", curr_str);
}
@@ -282,7 +282,7 @@ dissect_ppi_antenna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
break;
if (tree) {
/*proto_tree_add_item(ppi_antenna_tree, hf_ppi_antenna_descstr, tvb, offset, 32, ENC_ASCII|ENC_NA);*/
- curr_str = tvb_format_stringzpad(tvb, offset, 32);
+ curr_str = tvb_format_stringzpad(pinfo->pool, tvb, offset, 32);
proto_tree_add_string(ppi_antenna_tree, hf_ppi_antenna_descstr, tvb, offset, 32, curr_str);
proto_item_append_text(antenna_line, " (%s)", curr_str);
}
diff --git a/epan/dissectors/packet-ppi-gps.c b/epan/dissectors/packet-ppi-gps.c
index c8ee7c477d..24e3f30bba 100644
--- a/epan/dissectors/packet-ppi-gps.c
+++ b/epan/dissectors/packet-ppi-gps.c
@@ -348,7 +348,7 @@ dissect_ppi_gps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
if (tree)
{
/* proto_tree_add_item(ppi_gps_tree, hf_ppi_gps_descstr, tvb, offset, 32, ENC_ASCII|ENC_NA); */
- curr_str = tvb_format_stringzpad(tvb, offset, 32); /* need to append_text this */
+ curr_str = tvb_format_stringzpad(pinfo->pool, tvb, offset, 32); /* need to append_text this */
proto_tree_add_string(ppi_gps_tree, hf_ppi_gps_descstr, tvb, offset, 32, curr_str);
proto_item_append_text(gps_line, " (%s)", curr_str);
}
diff --git a/epan/dissectors/packet-ppi-sensor.c b/epan/dissectors/packet-ppi-sensor.c
index 137dc829dc..527a0aba2d 100644
--- a/epan/dissectors/packet-ppi-sensor.c
+++ b/epan/dissectors/packet-ppi-sensor.c
@@ -352,7 +352,7 @@ dissect_ppi_sensor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
if (tree)
{
/* proto_tree_add_item(ppi_vector_tree, hf_ppi_vector_descstr, tvb, offset, 32, ENC_NA); */
- curr_str = tvb_format_stringzpad(tvb, offset, 32);
+ curr_str = tvb_format_stringzpad(pinfo->pool, tvb, offset, 32);
proto_tree_add_string(ppi_sensor_tree, hf_ppi_sensor_descstr, tvb, offset, 32, curr_str);
proto_item_append_text(sensor_line, " (%s)", curr_str);
}
diff --git a/epan/dissectors/packet-ppi-vector.c b/epan/dissectors/packet-ppi-vector.c
index b2ec635f97..c8f89f05a5 100644
--- a/epan/dissectors/packet-ppi-vector.c
+++ b/epan/dissectors/packet-ppi-vector.c
@@ -857,7 +857,7 @@ dissect_ppi_vector_v2(tvbuff_t *tvb, packet_info *pinfo, int offset, gint length
if (ppi_vector_tree)
{
/* proto_tree_add_item(ppi_vector_tree, hf_ppi_vector_descstr, tvb, offset, 32, ENC_ASCII|ENC_NA); */
- curr_str = tvb_format_stringzpad(tvb, offset, 32); /* need to append_text this */
+ curr_str = tvb_format_stringzpad(pinfo->pool, tvb, offset, 32); /* need to append_text this */
proto_tree_add_string(ppi_vector_tree, hf_ppi_vector_descstr, tvb, offset, 32, curr_str);
proto_item_append_text(vector_line, " (%s)", curr_str);
}
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index c3d10f5584..3f0acac995 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -4478,7 +4478,7 @@ dissect_vsncp_apname_opt(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
tvb_get_string_enc(pinfo->pool, tvb, off, lengthofapn, ENC_ASCII),
"Label%d (%d byte%s): %s", j++, lengthofapn,
plurality(lengthofapn, "", "s"),
- tvb_format_text(tvb, off, lengthofapn));
+ tvb_format_text(pinfo->pool, tvb, off, lengthofapn));
off += lengthofapn;
i += lengthofapn + 1;
}
@@ -6160,7 +6160,7 @@ dissect_pap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(data_tree, hf_pap_peer_id, tvb, offset,
peer_id_length, ENC_ASCII|ENC_NA);
- peer_id = tvb_format_text(tvb, offset, peer_id_length);
+ peer_id = tvb_format_text(pinfo->pool, tvb, offset, peer_id_length);
offset += peer_id_length;
proto_tree_add_item(data_tree, hf_pap_password_length, tvb, offset,
@@ -6170,7 +6170,7 @@ dissect_pap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(data_tree, hf_pap_password, tvb, offset,
password_length, ENC_ASCII|ENC_NA);
- password = tvb_format_text(tvb, offset, password_length);
+ password = tvb_format_text(pinfo->pool, tvb, offset, password_length);
col_append_fstr(pinfo->cinfo, COL_INFO,
" (Peer-ID='%s', Password='%s')", peer_id, password);
@@ -6185,7 +6185,7 @@ dissect_pap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(data_tree, hf_pap_message, tvb, offset,
message_length, ENC_ASCII|ENC_NA);
- message = tvb_format_text(tvb, offset, message_length);
+ message = tvb_format_text(pinfo->pool, tvb, offset, message_length);
col_append_fstr(pinfo->cinfo, COL_INFO, " (Message='%s')",
message);
@@ -6289,7 +6289,7 @@ dissect_chap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
/* Show name and value in info column */
col_append_fstr(pinfo->cinfo, COL_INFO,
" (NAME='%s%s', VALUE=0x%s)",
- tvb_format_text(tvb, name_offset,
+ tvb_format_text(pinfo->pool, tvb, name_offset,
(name_size > 20) ? 20 : name_size),
(name_size > 20) ? "..." : "",
tvb_bytes_to_str(pinfo->pool, tvb, value_offset, value_size));
@@ -6307,7 +6307,7 @@ dissect_chap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
/* Show message in info column */
col_append_fstr(pinfo->cinfo, COL_INFO, " (MESSAGE='%s')",
- tvb_format_text(tvb, offset, length));
+ tvb_format_text(pinfo->pool, tvb, offset, length));
break;
/* Code from unknown code type... */
diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c
index b14d9e3c8d..089ffc212c 100644
--- a/epan/dissectors/packet-q931.c
+++ b/epan/dissectors/packet-q931.c
@@ -2153,7 +2153,7 @@ dissect_q931_number_ie(packet_info *pinfo, tvbuff_t *tvb, int offset, int len,
if (len == 0)
return;
proto_tree_add_item(tree, hfindex, tvb, offset, len, ENC_ASCII|ENC_NA);
- proto_item_append_text(proto_tree_get_parent(tree), ": '%s'", tvb_format_text(tvb, offset, len));
+ proto_item_append_text(proto_tree_get_parent(tree), ": '%s'", tvb_format_text(pinfo->pool, tvb, offset, len));
if ( number_plan == 1 ) {
if ( e164_info.e164_number_type != NONE ){
@@ -2449,7 +2449,7 @@ dissect_q931_ia5_ie(tvbuff_t *tvb, int offset, int len, proto_tree *tree,
{
if (len != 0) {
proto_tree_add_item(tree, hf_value, tvb, offset, len, ENC_ASCII|ENC_NA);
- proto_item_append_text(proto_tree_get_parent(tree), " '%s'", tvb_format_text(tvb, offset, len));
+ proto_item_append_text(proto_tree_get_parent(tree), " '%s'", tvb_format_text(wmem_packet_scope(), tvb, offset, len));
}
}
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c
index 9656c003d1..0a422de759 100644
--- a/epan/dissectors/packet-radius.c
+++ b/epan/dissectors/packet-radius.c
@@ -1056,7 +1056,7 @@ radius_string(radius_attr_info_t *a, proto_tree *tree, packet_info *pinfo _U_, t
case 0: /* not encrypted */
proto_tree_add_item(tree, a->hf, tvb, offset, len, ENC_UTF_8|ENC_NA);
- proto_item_append_text(avp_item, "%s", tvb_format_text(tvb, offset, len));
+ proto_item_append_text(avp_item, "%s", tvb_format_text(pinfo->pool, tvb, offset, len));
break;
case 1: /* encrypted like User-Password as defined in RFC 2865 */
diff --git a/epan/dissectors/packet-rlogin.c b/epan/dissectors/packet-rlogin.c
index 91a0b473c3..4da21ca516 100644
--- a/epan/dissectors/packet-rlogin.c
+++ b/epan/dissectors/packet-rlogin.c
@@ -256,7 +256,7 @@ static void rlogin_display(rlogin_hash_entry_t *hash_info,
user_info_item = proto_tree_add_string_format(rlogin_tree, hf_user_info, tvb,
offset, info_len, FALSE,
"User info (%s)",
- tvb_format_text(tvb, offset, info_len));
+ tvb_format_text(pinfo->pool, tvb, offset, info_len));
user_info_tree = proto_item_add_subtree(user_info_item,
ett_rlogin_user_info);
@@ -460,7 +460,7 @@ dissect_rlogin(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
/* Add data into info column */
col_append_fstr(pinfo->cinfo, COL_INFO,
"Data: %s",
- tvb_format_text(tvb, 0, bytes_to_copy));
+ tvb_format_text(pinfo->pool, tvb, 0, bytes_to_copy));
}
}
}
diff --git a/epan/dissectors/packet-rsip.c b/epan/dissectors/packet-rsip.c
index f6abe5e192..ecc47e812e 100644
--- a/epan/dissectors/packet-rsip.c
+++ b/epan/dissectors/packet-rsip.c
@@ -318,7 +318,7 @@ rsip_parameter(tvbuff_t *tvb, proto_tree *rsip_tree, int off, int eoff)
hf_rsip_parameter_address_fqdn, tvb,
off + 4, paramlen - 1, ENC_ASCII|ENC_NA);
proto_item_append_text(pti, ": %s",
- tvb_format_text(tvb, off + 4, paramlen - 1));
+ tvb_format_text(wmem_packet_scope(), tvb, off + 4, paramlen - 1));
} else
proto_item_append_text(pti,
": Any Fully Qualified Domain Name");
diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c
index 5654cb93a2..efdebc2feb 100644
--- a/epan/dissectors/packet-rsvp.c
+++ b/epan/dissectors/packet-rsvp.c
@@ -3137,7 +3137,7 @@ dissect_rsvp_ifid_tlv(proto_tree *ti, packet_info* pinfo, proto_tree *rsvp_objec
tvb, offset + tlv_off,
tlv_len,
subtree_type, NULL, "ERROR_STRING TLV - %s",
- tvb_format_text(tvb, offset + tlv_off + 4,
+ tvb_format_text(pinfo->pool, tvb, offset + tlv_off + 4,
tlv_len - 4));
proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset + tlv_off, 2,
tlv_type, "516 (ERROR_STRING)");
@@ -4927,7 +4927,7 @@ dissect_rsvp_session_attribute(proto_item *ti, proto_tree *rsvp_object_tree,
flags &0x04 ? "SE Style, " : "",
flags &0x08 ? "Bandwidth Protection, " : "",
flags &0x10 ? "Node Protection, " : "",
- name_len ? tvb_format_text(tvb, offset2+4, name_len) : "");
+ name_len ? tvb_format_text(wmem_packet_scope(), tvb, offset2+4, name_len) : "");
break;
default:
diff --git a/epan/dissectors/packet-rtpproxy.c b/epan/dissectors/packet-rtpproxy.c
index 69bd95a40e..56f3692b9d 100644
--- a/epan/dissectors/packet-rtpproxy.c
+++ b/epan/dissectors/packet-rtpproxy.c
@@ -352,7 +352,7 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t
codec_len = (guint)strlen(codecs[i]);
ti = proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_codec, tvb, begin+offset, codec_len,
(guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, begin+offset, codec_len, ENC_ASCII), NULL, 10));
- proto_item_append_text(ti, " (%s)", val_to_str_ext((guint)strtoul(tvb_format_text(tvb,begin+offset,codec_len),NULL,10), &rtp_payload_type_vals_ext, "Unknown"));
+ proto_item_append_text(ti, " (%s)", val_to_str_ext((guint)strtoul(tvb_format_text(pinfo->pool, tvb,begin+offset,codec_len),NULL,10), &rtp_payload_type_vals_ext, "Unknown"));
offset += codec_len;
if(codecs[i+1])
offset++; /* skip comma */
@@ -396,7 +396,7 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t
proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_dtmf, tvb, begin+offset, new_offset,
(guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, begin+offset, new_offset, ENC_ASCII), NULL, 10));
if(rtpproxy_establish_conversation){
- pt = (guint)strtoul(tvb_format_text(tvb,begin+offset,new_offset),NULL,10);
+ pt = (guint)strtoul(tvb_format_text(pinfo->pool, tvb,begin+offset,new_offset),NULL,10);
dissector_add_uint("rtp.pt", pt, rtp_events_handle);
}
offset += new_offset;
@@ -416,7 +416,7 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t
another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_transcode);
ti = proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_transcode, tvb, begin+offset, new_offset,
(guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, begin+offset, new_offset, ENC_ASCII), NULL, 10));
- proto_item_append_text(ti, " (%s)", val_to_str_ext((guint)strtoul(tvb_format_text(tvb,begin+offset, new_offset),NULL,10), &rtp_payload_type_vals_ext, "Unknown"));
+ proto_item_append_text(ti, " (%s)", val_to_str_ext((guint)strtoul(tvb_format_text(pinfo->pool, tvb,begin+offset, new_offset),NULL,10), &rtp_payload_type_vals_ext, "Unknown"));
offset += new_offset;
break;
case 'u':
@@ -593,7 +593,7 @@ dissect_rtpproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
}
/* Get payload string */
- rawstr = tvb_format_text(tvb, offset, realsize - offset);
+ rawstr = tvb_format_text(pinfo->pool, tvb, offset, realsize - offset);
/* Extract command */
tmp = g_ascii_tolower(tvb_get_guint8(tvb, offset));
diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c
index 1a290e709b..28a24d7dc6 100644
--- a/epan/dissectors/packet-rtse.c
+++ b/epan/dissectors/packet-rtse.c
@@ -317,7 +317,7 @@ dissect_rtse_T_octetString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
&string);
if(open_request && string)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", tvb_format_text(string, 0, tvb_reported_length(string)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", tvb_format_text(actx->pinfo->pool, string, 0, tvb_reported_length(string)));
@@ -355,7 +355,7 @@ dissect_rtse_CommonReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
offset = dissect_ber_UTCTime(implicit_tag, actx, tree, tvb, offset, hf_index, NULL, NULL);
if(open_request && string)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", tvb_format_text(string, 0, tvb_reported_length(string)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", tvb_format_text(actx->pinfo->pool, string, 0, tvb_reported_length(string)));
diff --git a/epan/dissectors/packet-rtsp.c b/epan/dissectors/packet-rtsp.c
index 9db937ce93..242dacd56b 100644
--- a/epan/dissectors/packet-rtsp.c
+++ b/epan/dissectors/packet-rtsp.c
@@ -1134,7 +1134,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item *ti;
ti = proto_tree_add_string(rtsp_tree, hf_rtsp_transport, tvb,
offset, linelen,
- tvb_format_text(tvb, value_offset,
+ tvb_format_text(pinfo->pool, tvb, value_offset,
value_len));
/*
@@ -1148,7 +1148,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
proto_tree_add_string(rtsp_tree, hf_rtsp_content_type,
tvb, offset, linelen,
- tvb_format_text(tvb, value_offset,
+ tvb_format_text(pinfo->pool, tvb, value_offset,
value_len));
offset = offset + (int)STRLEN_CONST(rtsp_content_type);
@@ -1169,7 +1169,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 clength;
gboolean clength_valid;
proto_item* pi;
- clength_valid = ws_strtou32(tvb_format_text(tvb, value_offset, value_len),
+ clength_valid = ws_strtou32(tvb_format_text(pinfo->pool, tvb, value_offset, value_len),
NULL, &clength);
pi = proto_tree_add_uint(rtsp_tree, hf_rtsp_content_length,
tvb, offset, linelen, clength);
@@ -1185,7 +1185,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
} else if (HDR_MATCHES(rtsp_Session))
{
- session_id = tvb_format_text(tvb, value_offset, value_len);
+ session_id = tvb_format_text(pinfo->pool, tvb, value_offset, value_len);
/* Put the value into the protocol tree */
proto_tree_add_string(rtsp_tree, hf_rtsp_session, tvb,
offset, linelen,
@@ -1201,7 +1201,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Put the value into the protocol tree */
ti = proto_tree_add_string(rtsp_tree, hf_rtsp_X_Vig_Msisdn,tvb,
offset, linelen ,
- tvb_format_text(tvb, value_offset, value_len));
+ tvb_format_text(pinfo->pool, tvb, value_offset, value_len));
sub_tree = proto_item_add_subtree(ti, ett_rtsp_method);
e164_info.e164_number_type = CALLING_PARTY_NUMBER;
@@ -1217,7 +1217,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
gboolean rdt_feature_level_valid;
proto_item* pi;
- rdt_feature_level_valid = ws_strtou32(tvb_format_text(tvb, value_offset, value_len),
+ rdt_feature_level_valid = ws_strtou32(tvb_format_text(pinfo->pool, tvb, value_offset, value_len),
NULL, &rdt_feature_level);
pi = proto_tree_add_uint(rtsp_tree, hf_rtsp_rdtfeaturelevel,
tvb, offset, linelen, rdt_feature_level);
@@ -1408,7 +1408,7 @@ process_rtsp_request(tvbuff_t *tvb, int offset, const guchar *data,
/* Add a tree for this request */
ti = proto_tree_add_string(tree, hf_rtsp_request, tvb, offset,
(gint) (next_line_offset - offset),
- tvb_format_text(tvb, offset, (gint) (next_line_offset - offset)));
+ tvb_format_text(wmem_packet_scope(), tvb, offset, (gint) (next_line_offset - offset)));
sub_tree = proto_item_add_subtree(ti, ett_rtsp_method);
@@ -1452,7 +1452,7 @@ process_rtsp_reply(tvbuff_t *tvb, int offset, const guchar *data,
/* Add a tree for this request */
ti = proto_tree_add_string(tree, hf_rtsp_response, tvb, offset,
(gint) (next_line_offset - offset),
- tvb_format_text(tvb, offset, (gint) (next_line_offset - offset)));
+ tvb_format_text(wmem_packet_scope(), tvb, offset, (gint) (next_line_offset - offset)));
sub_tree = proto_item_add_subtree(ti, ett_rtsp_method);
diff --git a/epan/dissectors/packet-s1ap.c b/epan/dissectors/packet-s1ap.c
index f3a2f8936c..5651242ae9 100644
--- a/epan/dissectors/packet-s1ap.c
+++ b/epan/dissectors/packet-s1ap.c
@@ -5883,7 +5883,7 @@ dissect_s1ap_ENBname(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr
is_ascii = tvb_ascii_isprint(parameter_tvb, 0, length);
if (is_ascii)
- proto_item_append_text(actx->created_item," (%s)",tvb_format_text(parameter_tvb, 0, length));
+ proto_item_append_text(actx->created_item," (%s)",tvb_format_text(actx->pinfo->pool, parameter_tvb, 0, length));
@@ -8240,7 +8240,7 @@ dissect_s1ap_MMEname(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr
is_ascii = tvb_ascii_isprint(parameter_tvb, 0, length);
if (is_ascii)
- proto_item_append_text(actx->created_item," (%s)",tvb_format_text(parameter_tvb, 0, length));
+ proto_item_append_text(actx->created_item," (%s)",tvb_format_text(actx->pinfo->pool, parameter_tvb, 0, length));
diff --git a/epan/dissectors/packet-s7comm.c b/epan/dissectors/packet-s7comm.c
index 76a8708a73..361cef714b 100644
--- a/epan/dissectors/packet-s7comm.c
+++ b/epan/dissectors/packet-s7comm.c
@@ -3165,7 +3165,7 @@ s7comm_decode_pistart_parameters(tvbuff_t *tvb,
offset += 1;
proto_tree_add_item(param_tree, hf[i], tvb, offset, len, ENC_ASCII|ENC_NA);
wmem_strbuf_append(args_buf, "\"");
- wmem_strbuf_append(args_buf, tvb_format_text(tvb, offset, len));
+ wmem_strbuf_append(args_buf, tvb_format_text(pinfo->pool, tvb, offset, len));
if (i < nfields-1) {
wmem_strbuf_append(args_buf, "\", ");
} else {
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index de4e9e1a6e..c6ba1de636 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -1423,7 +1423,7 @@ dissect_hostname_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree,
hostname_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH;
proto_tree_add_item(parameter_tree, hf_hostname, parameter_tvb, HOSTNAME_OFFSET, hostname_length, ENC_ASCII|ENC_NA);
- proto_item_append_text(parameter_item, " (Hostname: %.*s)", hostname_length, tvb_format_text(parameter_tvb, HOSTNAME_OFFSET, hostname_length));
+ proto_item_append_text(parameter_item, " (Hostname: %.*s)", hostname_length, tvb_format_text(wmem_packet_scope(), parameter_tvb, HOSTNAME_OFFSET, hostname_length));
}
diff --git a/epan/dissectors/packet-sebek.c b/epan/dissectors/packet-sebek.c
index d503191925..09ea4b94f6 100644
--- a/epan/dissectors/packet-sebek.c
+++ b/epan/dissectors/packet-sebek.c
@@ -123,7 +123,7 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
case 2: col_append_fstr(pinfo->cinfo, COL_INFO, " pid(%d)", tvb_get_ntohl(tvb, 20));
col_append_fstr(pinfo->cinfo, COL_INFO, " uid(%d)", tvb_get_ntohl(tvb, 24));
col_append_fstr(pinfo->cinfo, COL_INFO, " fd(%d)", tvb_get_ntohl(tvb, 28));
- col_append_fstr(pinfo->cinfo, COL_INFO, " cmd: %s", tvb_format_text(tvb, 32, 12));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " cmd: %s", tvb_format_text(pinfo->pool, tvb, 32, 12));
break;
case 3: col_append_fstr(pinfo->cinfo, COL_INFO, " pid(%d)", tvb_get_ntohl(tvb, 24));
col_append_fstr(pinfo->cinfo, COL_INFO, " uid(%d)", tvb_get_ntohl(tvb, 28));
@@ -131,7 +131,7 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
cmd_len = tvb_strnlen(tvb, 40, 12);
if (cmd_len<0)
cmd_len = 0;
- col_append_fstr(pinfo->cinfo, COL_INFO, " cmd: %s", tvb_format_text(tvb, 40, cmd_len));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " cmd: %s", tvb_format_text(pinfo->pool, tvb, 40, cmd_len));
break;
default:
break;
diff --git a/epan/dissectors/packet-selfm.c b/epan/dissectors/packet-selfm.c
index 007f8b2050..8127f6c291 100644
--- a/epan/dissectors/packet-selfm.c
+++ b/epan/dissectors/packet-selfm.c
@@ -2358,7 +2358,7 @@ dissect_fastmsg_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
/* find the null separators and add the bit label text strings to the tree */
for (null_offset = offset; null_offset < len; null_offset++) {
if ((tvb_memeql(tvb, null_offset, "\x00", 1) == 0) && (tvb_reported_length_remaining(tvb, offset) > 2)) {
- gchar* str = tvb_format_text(tvb, offset, (null_offset-offset));
+ gchar* str = tvb_format_text(pinfo->pool, tvb, offset, (null_offset-offset));
proto_tree_add_string_format(fastmsg_tree, hf_selfm_fastmsg_bit_label_name, tvb, offset, (null_offset-offset), str,
"Bit Label #%d Name: %s", cnt, str);
offset = null_offset+1; /* skip the null */
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index f7f5b458e7..3c25541a3b 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -1599,7 +1599,7 @@ static void
sip_proto_set_format_text(const proto_tree *tree, proto_item *item, tvbuff_t *tvb, int offset, int length)
{
if (tree != item && item && PTREE_DATA(item)->visible)
- proto_item_set_text(item, "%s", tvb_format_text(tvb, offset, length));
+ proto_item_set_text(item, "%s", tvb_format_text(wmem_packet_scope(), tvb, offset, length));
}
/*
* XXXX If/when more parameters are added consider doing something similar to what's done in
@@ -3522,22 +3522,22 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info
descr = is_known_request ? "Request" : "Unknown request";
col_add_lstr(pinfo->cinfo, COL_INFO,
descr, ": ",
- tvb_format_text(tvb, offset, linelen - SIP2_HDR_LEN - 1),
+ tvb_format_text(pinfo->pool, tvb, offset, linelen - SIP2_HDR_LEN - 1),
COL_ADD_LSTR_TERMINATOR);
DPRINT(("got %s: %s", descr,
- tvb_format_text(tvb, offset, linelen - SIP2_HDR_LEN - 1)));
+ tvb_format_text(pinfo->pool, tvb, offset, linelen - SIP2_HDR_LEN - 1)));
break;
case STATUS_LINE:
descr = "Status";
col_add_lstr(pinfo->cinfo, COL_INFO,
"Status: ",
- tvb_format_text(tvb, offset + SIP2_HDR_LEN + 1, linelen - SIP2_HDR_LEN - 1),
+ tvb_format_text(pinfo->pool, tvb, offset + SIP2_HDR_LEN + 1, linelen - SIP2_HDR_LEN - 1),
COL_ADD_LSTR_TERMINATOR);
stat_info->reason_phrase = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + SIP2_HDR_LEN + 5,
linelen - (SIP2_HDR_LEN + 5),ENC_UTF_8|ENC_NA);
DPRINT(("got Response: %s",
- tvb_format_text(tvb, offset + SIP2_HDR_LEN + 1, linelen - SIP2_HDR_LEN - 1)));
+ tvb_format_text(pinfo->pool, tvb, offset + SIP2_HDR_LEN + 1, linelen - SIP2_HDR_LEN - 1)));
break;
case OTHER_LINE:
@@ -3576,7 +3576,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info
if (sip_tree) {
reqresp_tree = proto_tree_add_subtree_format(sip_tree, tvb, offset, next_offset,
ett_sip_reqresp, NULL, "%s line: %s", descr,
- tvb_format_text(tvb, offset, linelen));
+ tvb_format_text(pinfo->pool, tvb, offset, linelen));
/* XXX: Is adding to 'reqresp_tree as intended ? Changed from original 'sip_tree' */
proto_tree_add_item(reqresp_tree, hf_sip_continuation, tvb, offset, -1, ENC_NA);
}
@@ -3678,7 +3678,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info
proto_item *ti_c;
proto_tree *ti_tree = proto_tree_add_subtree(hdr_tree, tvb,
offset, next_offset - offset, ett_sip_ext_hdr, &ti_c,
- tvb_format_text(tvb, offset, linelen));
+ tvb_format_text(pinfo->pool, tvb, offset, linelen));
ext_hdr_handle = dissector_get_string_handle(ext_hdr_subdissector_table, header_name);
if (ext_hdr_handle != NULL) {
@@ -5200,7 +5200,7 @@ tvb_raw_text_add(tvbuff_t *tvb, int offset, int length, proto_tree *tree)
if (global_sip_raw_text_without_crlf)
str = tvb_format_text_wsp(wmem_packet_scope(), tvb, offset, linelen);
else
- str = tvb_format_text(tvb, offset, linelen);
+ str = tvb_format_text(wmem_packet_scope(), tvb, offset, linelen);
proto_tree_add_string_format(raw_tree, hf_sip_raw_line, tvb, offset, linelen,
str,
"%s",
diff --git a/epan/dissectors/packet-skinny.c b/epan/dissectors/packet-skinny.c
index 8eaae2d5ca..9fde2a97c4 100644
--- a/epan/dissectors/packet-skinny.c
+++ b/epan/dissectors/packet-skinny.c
@@ -2499,7 +2499,7 @@ handle_EnblocCallMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_co
guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
guint32 VariableDirnumSize = (hdr_version >= V18_MSG_TYPE) ? 25 : 24;
- si->calledParty = g_strdup(tvb_format_stringzpad(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), VariableDirnumSize));
+ si->calledParty = g_strdup(tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), VariableDirnumSize));
ptvcursor_add(cursor, hf_skinny_calledParty, VariableDirnumSize, ENC_ASCII|ENC_NA);
if (hdr_data_length > 28) {
si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
@@ -4718,10 +4718,10 @@ static void
handle_CallInfoMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
{
ptvcursor_add(cursor, hf_skinny_callingPartyName, 40, ENC_ASCII|ENC_NA);
- si->callingParty = g_strdup(tvb_format_stringzpad(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), 24));
+ si->callingParty = g_strdup(tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), 24));
ptvcursor_add(cursor, hf_skinny_callingParty, 24, ENC_ASCII|ENC_NA);
ptvcursor_add(cursor, hf_skinny_calledPartyName, 40, ENC_ASCII|ENC_NA);
- si->calledParty = g_strdup(tvb_format_stringzpad(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), 24));
+ si->calledParty = g_strdup(tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), 24));
ptvcursor_add(cursor, hf_skinny_calledParty, 24, ENC_ASCII|ENC_NA);
si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
@@ -7249,7 +7249,7 @@ handle_CallInfoV2Message(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_co
ptvcursor_pop_subtree(cursor); /* end bitfield: partyPIRestrictionBits */
callingParty_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
if (callingParty_len > 1) {
- si->callingParty = g_strdup(tvb_format_stringzpad(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), callingParty_len));
+ si->callingParty = g_strdup(tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), callingParty_len));
ptvcursor_add(cursor, hf_skinny_callingParty, callingParty_len, ENC_ASCII|ENC_NA);
} else {
ptvcursor_advance(cursor, 1);
@@ -7262,7 +7262,7 @@ handle_CallInfoV2Message(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_co
}
calledParty_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
if (calledParty_len > 1) {
- si->calledParty = g_strdup(tvb_format_stringzpad(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), calledParty_len));
+ si->calledParty = g_strdup(tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), calledParty_len));
ptvcursor_add(cursor, hf_skinny_calledParty, calledParty_len, ENC_ASCII|ENC_NA);
} else {
ptvcursor_advance(cursor, 1);
diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c
index 53bd508b42..d5573fdb0c 100644
--- a/epan/dissectors/packet-smb-pipe.c
+++ b/epan/dissectors/packet-smb-pipe.c
@@ -379,8 +379,8 @@ get_stringz_pointer_value(tvbuff_t *tvb, int offset, int convert, int *cptrp,
if (tvb_offset_exists(tvb, cptr) &&
(string_len = tvb_strnlen(tvb, cptr, -1)) != -1) {
string_len++; /* include the terminating '\0' */
- *lenp = string_len;
- return tvb_format_text(tvb, cptr, string_len - 1);
+ *lenp = string_len;
+ return tvb_format_text(wmem_packet_scope(), tvb, cptr, string_len - 1);
} else
return NULL;
}
@@ -1769,7 +1769,7 @@ dissect_request_parameters(tvbuff_t *tvb, int offset, packet_info *pinfo,
"%s: Value is %s, type is wrong (z)",
proto_registrar_get_name((*items->hf_index == -1) ?
hf_smb_pipe_string_param : *items->hf_index),
- tvb_format_text(tvb, offset, string_len));
+ tvb_format_text(pinfo->pool, tvb, offset, string_len));
offset += string_len;
items++;
} else {
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c
index 47275cae53..50e8b1169c 100644
--- a/epan/dissectors/packet-smb.c
+++ b/epan/dissectors/packet-smb.c
@@ -16320,7 +16320,7 @@ dissect_qfsi_vals(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
proto_tree_add_bytes_format_value(tree, hf_smb_mac_fndrinfo, tvb,
offset, 32, NULL,
"%s",
- tvb_format_text(tvb, offset, 32));
+ tvb_format_text(pinfo->pool, tvb, offset, 32));
COUNT_BYTES_TRANS_SUBR(32);
/* Number Files */
CHECK_BYTE_COUNT_TRANS_SUBR(4);
diff --git a/epan/dissectors/packet-smtp.c b/epan/dissectors/packet-smtp.c
index 7bb5c0020b..fe5bac7cba 100644
--- a/epan/dissectors/packet-smtp.c
+++ b/epan/dissectors/packet-smtp.c
@@ -971,7 +971,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
proto_tree_add_string(cmdresp_tree, hf_smtp_username, tvb, loffset + 11, linelen - 11, decrypt);
col_append_str(pinfo->cinfo, COL_INFO,
- tvb_format_text(tvb, loffset, 11));
+ tvb_format_text(pinfo->pool, tvb, loffset, 11));
col_append_fstr(pinfo->cinfo, COL_INFO, "User: %s", format_text(pinfo->pool, decrypt, decrypt_len));
}
}
@@ -993,19 +993,19 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset + 10, linelen - 10, ENC_ASCII);
decrypt_len = linelen - 10;
col_append_str(pinfo->cinfo, COL_INFO,
- tvb_format_text(tvb, loffset, 10));
+ tvb_format_text(pinfo->pool, tvb, loffset, 10));
col_append_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, decrypt, linelen - 10));
}
else {
base64_string = tvb_get_string_enc(pinfo->pool, tvb, loffset + 10, linelen - 10, ENC_ASCII);
col_append_str(pinfo->cinfo, COL_INFO,
- tvb_format_text(tvb, loffset, 10));
+ tvb_format_text(pinfo->pool, tvb, loffset, 10));
dissect_ntlm_auth(tvb, pinfo, cmdresp_tree, format_text(pinfo->pool, base64_string, linelen - 10));
}
}
else {
col_append_str(pinfo->cinfo, COL_INFO,
- tvb_format_text(tvb, loffset, 10));
+ tvb_format_text(pinfo->pool, tvb, loffset, 10));
col_append_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, decrypt, linelen - 10));
}
}
@@ -1014,18 +1014,18 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
proto_tree_add_item(cmdresp_tree, hf_smtp_req_parameter, tvb,
loffset + 5, linelen - 5, ENC_ASCII|ENC_NA);
col_append_str(pinfo->cinfo, COL_INFO,
- tvb_format_text(tvb, loffset, 11));
+ tvb_format_text(pinfo->pool, tvb, loffset, 11));
decode_plain_auth(tvb, pinfo, cmdresp_tree, loffset + 11, linelen - 11);
}
else if (linelen > 5) {
proto_tree_add_item(cmdresp_tree, hf_smtp_req_parameter, tvb,
loffset + 5, linelen - 5, ENC_ASCII|ENC_NA);
col_append_str(pinfo->cinfo, COL_INFO,
- tvb_format_text(tvb, loffset, linelen));
+ tvb_format_text(pinfo->pool, tvb, loffset, linelen));
}
else {
col_append_str(pinfo->cinfo, COL_INFO,
- tvb_format_text(tvb, loffset, linelen));
+ tvb_format_text(pinfo->pool, tvb, loffset, linelen));
}
if (smtp_data_desegment && !spd_frame_data->more_frags) {
@@ -1211,15 +1211,15 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if ((multiline_state != SMTP_MULTILINE_CONTINUE) &&
(multiline_state != SMTP_MULTILINE_END)) {
col_append_fstr(pinfo->cinfo, COL_INFO, "%s",
- tvb_format_text(tvb, offset, linelen));
+ tvb_format_text(pinfo->pool, tvb, offset, linelen));
} else {
col_append_fstr(pinfo->cinfo, COL_INFO, "%s",
- tvb_format_text(tvb, offset+4, linelen-4));
+ tvb_format_text(pinfo->pool, tvb, offset+4, linelen-4));
}
}
} else {
col_append_str(pinfo->cinfo, COL_INFO,
- tvb_format_text(tvb, offset, linelen));
+ tvb_format_text(pinfo->pool, tvb, offset, linelen));
}
}
diff --git a/epan/dissectors/packet-ssh.c b/epan/dissectors/packet-ssh.c
index cf81642304..22db2460a6 100644
--- a/epan/dissectors/packet-ssh.c
+++ b/epan/dissectors/packet-ssh.c
@@ -1175,7 +1175,7 @@ ssh_dissect_protocol(tvbuff_t *tvb, packet_info *pinfo,
}
col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Protocol (%s)",
- tvb_format_text(tvb, offset, protolen));
+ tvb_format_text(pinfo->pool, tvb, offset, protolen));
// V_C / V_S (client and server identification strings) RFC4253 4.2
// format: SSH-protoversion-softwareversion SP comments [CR LF not incl.]
diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c
index aada606039..0cfac4bc59 100644
--- a/epan/dissectors/packet-sua.c
+++ b/epan/dissectors/packet-sua.c
@@ -592,7 +592,7 @@ dissect_info_string_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto
proto_tree_add_item(parameter_tree, hf_sua_info_string, parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_UTF_8|ENC_NA);
proto_item_append_text(parameter_item, " (%.*s)", info_string_length,
- tvb_format_text(parameter_tvb, INFO_STRING_OFFSET, info_string_length));
+ tvb_format_text(pinfo->pool, parameter_tvb, INFO_STRING_OFFSET, info_string_length));
}
#define ROUTING_CONTEXT_LENGTH 4
@@ -1496,7 +1496,7 @@ dissect_hostname_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree,
hostname_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH;
proto_tree_add_item(parameter_tree, source ? hf_sua_source_hostname : hf_sua_dest_hostname, parameter_tvb, HOSTNAME_OFFSET, hostname_length, ENC_ASCII|ENC_NA);
proto_item_append_text(parameter_item, " (%.*s)", hostname_length,
- tvb_format_text(parameter_tvb, HOSTNAME_OFFSET, hostname_length));
+ tvb_format_text(wmem_packet_scope(), parameter_tvb, HOSTNAME_OFFSET, hostname_length));
}
#define IPV6_ADDRESS_LENGTH 16
diff --git a/epan/dissectors/packet-syslog.c b/epan/dissectors/packet-syslog.c
index 911bb12cc1..5a424e3eeb 100644
--- a/epan/dissectors/packet-syslog.c
+++ b/epan/dissectors/packet-syslog.c
@@ -259,7 +259,7 @@ dissect_syslog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
}
msg_len = tvb_ensure_captured_length_remaining(tvb, msg_off);
- msg_str = tvb_format_text(tvb, msg_off, msg_len);
+ msg_str = tvb_format_text(pinfo->pool, tvb, msg_off, msg_len);
reported_msg_len = tvb_reported_length_remaining(tvb, msg_off);
mtp3_tvb = mtp3_msu_present(tvb, pinfo, fac, lev, msg_str,
diff --git a/epan/dissectors/packet-systemd-journal.c b/epan/dissectors/packet-systemd-journal.c
index 6601f313fa..3d4938887c 100644
--- a/epan/dissectors/packet-systemd-journal.c
+++ b/epan/dissectors/packet-systemd-journal.c
@@ -293,7 +293,7 @@ static void init_jf_to_hf_map(void) {
static void
dissect_sjle_time_usecs(proto_tree *tree, int hf_idx, tvbuff_t *tvb, int offset, int len) {
guint64 rt_ts = 0;
- char *time_str = tvb_format_text(tvb, offset, len);
+ char *time_str = tvb_format_text(wmem_packet_scope(), tvb, offset, len);
gboolean ok = ws_strtou64(time_str, NULL, &rt_ts);
if (ok) {
nstime_t ts;
@@ -307,13 +307,13 @@ dissect_sjle_time_usecs(proto_tree *tree, int hf_idx, tvbuff_t *tvb, int offset,
static void
dissect_sjle_uint(proto_tree *tree, int hf_idx, tvbuff_t *tvb, int offset, int len) {
- guint32 uint_val = (guint32) strtoul(tvb_format_text(tvb, offset, len), NULL, 10);
+ guint32 uint_val = (guint32) strtoul(tvb_format_text(wmem_packet_scope(), tvb, offset, len), NULL, 10);
proto_tree_add_uint(tree, hf_idx, tvb, offset, len, uint_val);
}
static void
dissect_sjle_int(proto_tree *tree, int hf_idx, tvbuff_t *tvb, int offset, int len) {
- gint32 int_val = (gint32) strtol(tvb_format_text(tvb, offset, len), NULL, 10);
+ gint32 int_val = (gint32) strtol(tvb_format_text(wmem_packet_scope(), tvb, offset, len), NULL, 10);
proto_tree_add_int(tree, hf_idx, tvb, offset, len, int_val);
}
@@ -407,11 +407,11 @@ dissect_systemd_journal_line_entry(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
proto_tree_add_item(bin_tree, hf_sj_binary_data_len, tvb, offset + noeql_len + 1, 8, ENC_LITTLE_ENDIAN);
if (hf_idx == hf_sj_message) {
col_clear(pinfo->cinfo, COL_INFO);
- col_add_str(pinfo->cinfo, COL_INFO, tvb_format_text(tvb, data_off, (int) data_len));
+ col_add_str(pinfo->cinfo, COL_INFO, tvb_format_text(pinfo->pool, tvb, data_off, (int) data_len));
}
} else {
proto_item *unk_ti = proto_tree_add_none_format(sje_tree, hf_sj_unknown_field, tvb, offset, line_len,
- "Unknown data field: %s", tvb_format_text(tvb, offset, eq_off - offset - 1));
+ "Unknown data field: %s", tvb_format_text(pinfo->pool, tvb, offset, eq_off - offset - 1));
proto_tree *unk_tree = proto_item_add_subtree(unk_ti, ett_systemd_unknown_field);
proto_item *expert_ti = proto_tree_add_item(unk_tree, hf_sj_unknown_field_name, tvb, offset, offset + noeql_len, ENC_UTF_8|ENC_NA);
proto_tree_add_item(unk_tree, hf_sj_unknown_field_data, tvb, data_off, (int) data_len, ENC_UTF_8|ENC_NA);
diff --git a/epan/dissectors/packet-tapa.c b/epan/dissectors/packet-tapa.c
index 34ef1070bd..44f22731bd 100644
--- a/epan/dissectors/packet-tapa.c
+++ b/epan/dissectors/packet-tapa.c
@@ -183,7 +183,7 @@ dissect_tapa_discover_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tapa_di
item_type = tvb_get_guint8(tvb, offset);
item_type_text = val_to_str(item_type, tapa_discover_request_vals, "%d");
item_length = tvb_get_ntohs(tvb, offset + 2);
- item_text = tvb_format_text(tvb, offset + 4, item_length);
+ item_text = tvb_format_text(pinfo->pool, tvb, offset + 4, item_length);
col_append_fstr(pinfo->cinfo, COL_INFO, ", %s: %s",
item_type_text, item_text);
@@ -250,7 +250,7 @@ dissect_tapa_discover_unknown_new_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_t
is_ascii = check_ascii(tvb, offset + 4, item_length);
if (is_ascii)
- item_text = tvb_format_text(tvb, offset + 4, item_length);
+ item_text = tvb_format_text(pinfo->pool, tvb, offset + 4, item_length);
else
item_text = "BINARY-DATA";
diff --git a/epan/dissectors/packet-telnet.c b/epan/dissectors/packet-telnet.c
index 5525ce5564..2c5aeeef1e 100644
--- a/epan/dissectors/packet-telnet.c
+++ b/epan/dissectors/packet-telnet.c
@@ -277,7 +277,7 @@ dissect_string_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, in
if (len > 0) {
proto_tree_add_item(tree, hf_telnet_string_subopt_value, tvb, offset, len, ENC_NA|ENC_ASCII);
}
- check_for_tn3270(pinfo, optname, tvb_format_text(tvb, offset, len));
+ check_for_tn3270(pinfo, optname, tvb_format_text(pinfo->pool, tvb, offset, len));
break;
case 1: /* SEND */
@@ -419,7 +419,7 @@ dissect_tn3270e_subopt(packet_info *pinfo _U_, const char *optname _U_, tvbuff_t
datalen = connect_offset - (offset + 1);
if (datalen > 0) {
proto_tree_add_item( tree, hf_tn3270_is, tvb, offset + 1, datalen, ENC_NA|ENC_ASCII );
- check_tn3270_model(pinfo, tvb_format_text(tvb, offset + 1, datalen));
+ check_tn3270_model(pinfo, tvb_format_text(pinfo->pool, tvb, offset + 1, datalen));
offset += datalen;
len -= datalen;
}
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c
index 54d9c2286c..53d8955640 100644
--- a/epan/dissectors/packet-tftp.c
+++ b/epan/dissectors/packet-tftp.c
@@ -268,9 +268,9 @@ tftp_dissect_options(tvbuff_t *tvb, packet_info *pinfo, int offset,
value_len = tvb_strsize(tvb, value_offset);
/* use xxx_len-1 to exclude the trailing 0 byte, it would be
displayed as nonprinting character
- tvb_format_text() creates a temporary 0-terminated buffer */
- optionname = tvb_format_text(tvb, offset, option_len-1);
- optionvalue = tvb_format_text(tvb, value_offset, value_len-1);
+ tvb_format_text(pinfo->pool, ) creates a temporary 0-terminated buffer */
+ optionname = tvb_format_text(pinfo->pool, tvb, offset, option_len-1);
+ optionvalue = tvb_format_text(pinfo->pool, tvb, value_offset, value_len-1);
opt_tree = proto_tree_add_subtree_format(tree, tvb, offset, option_len+value_len,
ett_tftp_option, NULL, "Option: %s = %s", optionname, optionvalue);
@@ -446,7 +446,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
tftp_info->request_frame = pinfo->num;
col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
- tvb_format_stringzpad(tvb, offset, i1));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset, i1));
offset += i1;
@@ -455,7 +455,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
tvb, offset, i1, ENC_ASCII|ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, ", Transfer type: %s",
- tvb_format_stringzpad(tvb, offset, i1));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset, i1));
offset += i1;
@@ -472,7 +472,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
tftp_info->request_frame = pinfo->num;
col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
- tvb_format_stringzpad(tvb, offset, i1));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset, i1));
offset += i1;
@@ -481,7 +481,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
tvb, offset, i1, ENC_ASCII|ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, ", Transfer type: %s",
- tvb_format_stringzpad(tvb, offset, i1));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset, i1));
offset += i1;
@@ -695,7 +695,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
i1, ENC_ASCII|ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, ", Message: %s",
- tvb_format_stringzpad(tvb, offset, i1));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset, i1));
/*
* If the packet looks like an intentional "close" after a transfer-size
@@ -777,7 +777,7 @@ is_valid_requerest_body(tvbuff_t *tvb)
offset += tvb_strsize(tvb, offset);
guint len = tvb_strsize(tvb, offset);
- const gchar* mode = tvb_format_stringzpad(tvb, offset, len);
+ const gchar* mode = tvb_format_stringzpad(wmem_packet_scope(), tvb, offset, len);
const gchar* modes[] = {"netscii", "octet", "mail"};
for(guint i = 0; i < array_length(modes); ++i) {
diff --git a/epan/dissectors/packet-tsdns.c b/epan/dissectors/packet-tsdns.c
index ebd86f211b..99969fedcd 100644
--- a/epan/dissectors/packet-tsdns.c
+++ b/epan/dissectors/packet-tsdns.c
@@ -72,7 +72,7 @@ static int dissect_tsdns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
hidden_item = proto_tree_add_boolean(tsdns_tree, hf_tsdns_response, tvb, 0, 0, 1);
address_item = proto_tree_add_item(tsdns_tree, hf_tsdns_response_address, tvb, offset, pLen, ENC_ASCII|ENC_NA);
gchar** splitAddress;
- splitAddress = wmem_strsplit(pinfo->pool, tvb_format_text(tvb, 0, pLen), ":", 1); // unsure if TSDNS also does IPv6...
+ splitAddress = wmem_strsplit(pinfo->pool, tvb_format_text(pinfo->pool, tvb, 0, pLen), ":", 1); // unsure if TSDNS also does IPv6...
if (splitAddress == NULL || splitAddress[0] == NULL || splitAddress[1] == NULL) {
expert_add_info(pinfo, address_item, &ei_response_port_malformed);
} else {
diff --git a/epan/dissectors/packet-ua3g.c b/epan/dissectors/packet-ua3g.c
index 8a536af442..5d80480775 100644
--- a/epan/dissectors/packet-ua3g.c
+++ b/epan/dissectors/packet-ua3g.c
@@ -1985,7 +1985,7 @@ decode_lcd_line_cmd(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
strbuf = wmem_strbuf_new_label(pinfo->pool);
- wmem_strbuf_append_printf(strbuf, "\"%s\"", tvb_format_text(tvb, offset + 2, length - 2));
+ wmem_strbuf_append_printf(strbuf, "\"%s\"", tvb_format_text(pinfo->pool, tvb, offset + 2, length - 2));
ua3g_param_tree = proto_tree_add_subtree_format(ua3g_body_tree, tvb, offset,
length, ett_ua3g_param, NULL, "%s %d: %s",
diff --git a/epan/dissectors/packet-udld.c b/epan/dissectors/packet-udld.c
index c51e274d57..238ed1817f 100644
--- a/epan/dissectors/packet-udld.c
+++ b/epan/dissectors/packet-udld.c
@@ -140,13 +140,13 @@ dissect_udld(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
col_append_fstr(pinfo->cinfo, COL_INFO,
"Device ID: %s ",
- tvb_format_stringzpad(tvb, offset + 4,
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 4,
length - 4));
if (tree) {
tlv_tree = proto_tree_add_subtree_format(udld_tree, tvb, offset,
length, ett_udld_tlv, NULL, "Device ID: %s",
- tvb_format_stringzpad(tvb, offset + 4, length - 4));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 4, length - 4));
proto_tree_add_uint(tlv_tree, hf_udld_tlvtype, tvb,
offset + TLV_TYPE, 2, type);
proto_tree_add_uint(tlv_tree, hf_udld_tlvlength, tvb,
@@ -171,12 +171,12 @@ dissect_udld(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
col_append_fstr(pinfo->cinfo, COL_INFO,
"Port ID: %s ",
- tvb_format_stringzpad(tvb, offset + 4, length - 4));
+ tvb_format_stringzpad(pinfo->pool, tvb, offset + 4, length - 4));
if (tree) {
tlv_tree = proto_tree_add_subtree_format(udld_tree, tvb, offset,
real_length, ett_udld_tlv, NULL, "Port ID: %s",
- tvb_format_text(tvb, offset + 4, real_length - 4));
+ tvb_format_text(pinfo->pool, tvb, offset + 4, real_length - 4));
proto_tree_add_uint(tlv_tree, hf_udld_tlvtype, tvb,
offset + TLV_TYPE, 2, type);
proto_tree_add_uint(tlv_tree, hf_udld_tlvlength, tvb,
diff --git a/epan/dissectors/packet-ulp.c b/epan/dissectors/packet-ulp.c
index 2a808e7867..253bc253b9 100644
--- a/epan/dissectors/packet-ulp.c
+++ b/epan/dissectors/packet-ulp.c
@@ -4626,7 +4626,7 @@ dissect_ulp_T_mdn_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr
proto_tree *subtree;
subtree = proto_item_add_subtree(actx->created_item, ett_ulp_thirdPartyId);
- proto_tree_add_string(subtree, hf_ulp_mobile_directory_number, mdn_tvb, 0, 8, tvb_bcd_dig_to_wmem_packet_str(mdn_tvb, 0, 8, NULL, FALSE));
+ proto_tree_add_string(subtree, hf_ulp_mobile_directory_number, mdn_tvb, 0, 8, tvb_bcd_dig_to_str(actx->pinfo->pool, mdn_tvb, 0, 8, NULL, FALSE));
}
diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c
index 4033ae75d7..50f86e0f07 100644
--- a/epan/dissectors/packet-vnc.c
+++ b/epan/dissectors/packet-vnc.c
@@ -1150,7 +1150,7 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset,
col_add_fstr(pinfo->cinfo, COL_INFO,
"Server protocol version: %s",
- tvb_format_text(tvb, 4, 7));
+ tvb_format_text(pinfo->pool, tvb, 4, 7));
per_conversation_info->vnc_next_state = VNC_SESSION_STATE_CLIENT_VERSION;
break;
@@ -1166,7 +1166,7 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset,
col_add_fstr(pinfo->cinfo, COL_INFO,
"Client protocol version: %s",
- tvb_format_text(tvb, 4, 7));
+ tvb_format_text(pinfo->pool, tvb, 4, 7));
per_conversation_info->vnc_next_state = VNC_SESSION_STATE_SECURITY;
break;
diff --git a/epan/dissectors/packet-vpp.c b/epan/dissectors/packet-vpp.c
index 811263b464..e1c9e41d12 100644
--- a/epan/dissectors/packet-vpp.c
+++ b/epan/dissectors/packet-vpp.c
@@ -96,7 +96,7 @@ add_multi_line_string_to_tree(proto_tree *tree, tvbuff_t *tvb, gint start,
line_len = tvb_find_line_end(tvb, start, len, &next, FALSE);
data_len = next - start;
proto_tree_add_string(tree, hf, tvb, start, data_len,
- tvb_format_stringzpad(tvb, start, line_len));
+ tvb_format_stringzpad(wmem_packet_scope(), tvb, start, line_len));
start += data_len;
len -= data_len;
}
diff --git a/epan/dissectors/packet-vxi11.c b/epan/dissectors/packet-vxi11.c
index cbed8ea035..72d9962046 100644
--- a/epan/dissectors/packet-vxi11.c
+++ b/epan/dissectors/packet-vxi11.c
@@ -524,7 +524,7 @@ dissect_device_read_resp(tvbuff_t *tvb,
datalength = tvb_get_ntohl( tvb, offset);
if(MAX_DATA_SHOW_SIZE <=datalength)
datalength = MAX_DATA_SHOW_SIZE;
- col_append_fstr( pinfo->cinfo, COL_INFO," %s",tvb_format_text(tvb, offset+4,(guint32) datalength));
+ col_append_fstr( pinfo->cinfo, COL_INFO," %s",tvb_format_text(pinfo->pool, tvb, offset+4,(guint32) datalength));
offset = dissect_rpc_opaque_data(tvb, offset, tree, NULL, hf_vxi11_core_data, FALSE, 0, FALSE, NULL, NULL);
@@ -596,7 +596,7 @@ dissect_device_write_parms(tvbuff_t *tvb,
datalength = tvb_get_ntohl( tvb, offset);
if(MAX_DATA_SHOW_SIZE <=datalength)
datalength = MAX_DATA_SHOW_SIZE;
- col_append_fstr( pinfo->cinfo, COL_INFO," %s",tvb_format_text(tvb, offset+4,(guint32) datalength));
+ col_append_fstr( pinfo->cinfo, COL_INFO," %s",tvb_format_text(pinfo->pool, tvb, offset+4,(guint32) datalength));
offset = dissect_rpc_opaque_data(tvb, offset, tree, NULL, hf_vxi11_core_data, FALSE, 0, FALSE, NULL, NULL);
proto_item_append_text(tree, " (Device_WriteParms) LID=%d", lid);
diff --git a/epan/dissectors/packet-wbxml.c b/epan/dissectors/packet-wbxml.c
index 774396ffcf..cf0d153bf5 100644
--- a/epan/dissectors/packet-wbxml.c
+++ b/epan/dissectors/packet-wbxml.c
@@ -7098,7 +7098,7 @@ parse_wbxml_attribute_list_defined (proto_tree *tree, tvbuff_t *tvb, packet_info
break;
case 0x03: /* STR_I */
len = tvb_strsize (tvb, off+1);
- str = tvb_format_text (tvb, off+1, len-1);
+ str = tvb_format_text (pinfo->pool, tvb, off+1, len-1);
proto_tree_add_string_format(tree, hf_wbxml_str_i, tvb, off, 1+len, str,
" %3d | Attr | A %3d | STR_I (Inline string) | %s\'%s\'",
recursion_level, *codepage_attr, Indent (recursion_level), str);
@@ -7112,7 +7112,7 @@ parse_wbxml_attribute_list_defined (proto_tree *tree, tvbuff_t *tvb, packet_info
if (len <= tvb_len) {
str_len = tvb_strsize (tvb, str_tbl+idx);
attr_save_known = 0;
- attr_save_literal = tvb_format_text (tvb, str_tbl+idx, str_len-1);
+ attr_save_literal = tvb_format_text (pinfo->pool, tvb, str_tbl+idx, str_len-1);
proto_tree_add_string_format(tree, hf_wbxml_literal, tvb, off, 1+len, attr_save_literal,
" %3d | Attr | A %3d | LITERAL (Literal Attribute) | %s<%s />",
recursion_level, *codepage_attr, Indent (recursion_level), attr_save_literal);
@@ -7127,7 +7127,7 @@ parse_wbxml_attribute_list_defined (proto_tree *tree, tvbuff_t *tvb, packet_info
case 0x42: /* EXT_I_2 */
/* Extension tokens */
len = tvb_strsize (tvb, off+1);
- str = tvb_format_text (tvb, off+1, len-1);
+ str = tvb_format_text (pinfo->pool, tvb, off+1, len-1);
proto_tree_add_string_format(tree, hf_wbxml_ext_i, tvb, off, 1+len, str,
" %3d | Attr | A %3d | EXT_I_%1x (Extension Token) | %s(%s: \'%s\')",
recursion_level, *codepage_attr, peek & 0x0f, Indent (recursion_level),
@@ -7148,10 +7148,10 @@ parse_wbxml_attribute_list_defined (proto_tree *tree, tvbuff_t *tvb, packet_info
if (map->ext_t[peek & 0x03])
s = (map->ext_t[peek & 0x03])(tvb, idx, str_tbl);
else
- s = wmem_strdup_printf(wmem_packet_scope(), "EXT_T_%1x (%s)", peek & 0x03,
+ s = wmem_strdup_printf(pinfo->pool, "EXT_T_%1x (%s)", peek & 0x03,
map_token (map->global, 0, peek));
} else {
- s = wmem_strdup_printf(wmem_packet_scope(), "Extension Token, integer value: (%u", idx);
+ s = wmem_strdup_printf(pinfo->pool, "Extension Token, integer value: (%u", idx);
}
proto_tree_add_string_format(tree, hf_wbxml_ext_t, tvb, off, 1+len, s,
" %3d | Tag | T %3d | EXT_T_%1x (Extension Token) | %s%s)",
@@ -7169,7 +7169,7 @@ parse_wbxml_attribute_list_defined (proto_tree *tree, tvbuff_t *tvb, packet_info
idx = tvb_get_guintvar (tvb, off+1, &len, pinfo, &ei_wbxml_oversized_uintvar);
if (len <= tvb_len) {
str_len = tvb_strsize (tvb, str_tbl+idx);
- str = tvb_format_text (tvb, str_tbl+idx, str_len-1);
+ str = tvb_format_text (pinfo->pool, tvb, str_tbl+idx, str_len-1);
proto_tree_add_string_format(tree, hf_wbxml_str_t, tvb, off, 1+len, str,
" %3d | Attr | A %3d | STR_T (Tableref string) | %s\'%s\'",
recursion_level, *codepage_attr, Indent (recursion_level), str);
@@ -7379,7 +7379,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gu
break;
case 0x03: /* STR_I */
len = tvb_strsize (tvb, off+1);
- str = tvb_format_text (tvb, off+1, len-1);
+ str = tvb_format_text (pinfo->pool, tvb, off+1, len-1);
proto_tree_add_string_format(tree, hf_wbxml_str_i, tvb, off, 1+len, str,
" %3d | Tag | T %3d | STR_I (Inline string) | %s\'%s\'",
recursion_level, *codepage_stag, Indent(recursion_level),
@@ -7391,7 +7391,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gu
case 0x42: /* EXT_I_2 */
/* Extension tokens */
len = tvb_strsize (tvb, off+1);
- str = tvb_format_text (tvb, off+1, len-1);
+ str = tvb_format_text (pinfo->pool, tvb, off+1, len-1);
proto_tree_add_string_format(tree, hf_wbxml_ext_i, tvb, off, 1+len, str,
" %3d | Tag | T %3d | EXT_I_%1x (Extension Token) | %s(%s: \'%s\')",
recursion_level, *codepage_stag,
@@ -7429,12 +7429,12 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gu
if (map->ext_t[peek & 0x03])
s = (map->ext_t[peek & 0x03])(tvb, idx, str_tbl);
else
- s = wmem_strdup_printf(wmem_packet_scope(), "EXT_T_%1x (%s)", peek & 0x03,
+ s = wmem_strdup_printf(pinfo->pool, "EXT_T_%1x (%s)", peek & 0x03,
map_token (map->global, 0, peek));
}
else
{
- s = wmem_strdup_printf(wmem_packet_scope(), "(Extension Token, integer value: %u)", idx);
+ s = wmem_strdup_printf(pinfo->pool, "(Extension Token, integer value: %u)", idx);
}
proto_tree_add_string_format(tree, hf_wbxml_ext_t, tvb, off, 1+len, s,
" %3d | Tag | T %3d | EXT_T_%1x (Extension Token) | %s%s",
@@ -7445,7 +7445,7 @@ parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gu
case 0x83: /* STR_T */
idx = tvb_get_guintvar (tvb, off+1, &len, pinfo, &ei_wbxml_oversized_uintvar);
str_len = tvb_strsize (tvb, str_tbl+idx);
- str = tvb_format_text (tvb, str_tbl+idx, str_len-1);
+ str = tvb_format_text (pinfo->pool, tvb, str_tbl+idx, str_len-1);
proto_tree_add_string_format(tree, hf_wbxml_str_t, tvb, off, 1+len, str,
" %3d | Tag | T %3d | STR_T (Tableref string) | %s\'%s\'",
recursion_level, *codepage_stag, Indent (recursion_level), str);
@@ -7783,15 +7783,15 @@ dissect_wbxml_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Compose the summary line */
if ( publicid ) {
- summary = wmem_strdup_printf(wmem_packet_scope(), "%s, Public ID: \"%s\"",
+ summary = wmem_strdup_printf(pinfo->pool, "%s, Public ID: \"%s\"",
val_to_str_ext (version, &vals_wbxml_versions_ext, "(unknown 0x%x)"),
val_to_str_ext (publicid, &vals_wbxml_public_ids_ext, "(unknown 0x%x)"));
} else {
/* Read length of Public ID from string table */
len = tvb_strsize (tvb, str_tbl + publicid_index);
- summary = wmem_strdup_printf(wmem_packet_scope(), "%s, Public ID: \"%s\"",
+ summary = wmem_strdup_printf(pinfo->pool, "%s, Public ID: \"%s\"",
val_to_str_ext (version, &vals_wbxml_versions_ext, "(unknown 0x%x)"),
- tvb_format_text (tvb, str_tbl + publicid_index, len - 1));
+ tvb_format_text (pinfo->pool, tvb, str_tbl + publicid_index, len - 1));
}
/* Add summary to INFO column if it is enabled */
diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c
index 9200464e91..a3e187c631 100644
--- a/epan/dissectors/packet-wsp.c
+++ b/epan/dissectors/packet-wsp.c
@@ -5100,8 +5100,8 @@ add_uri (proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
proto_tree_add_item (tree, hf_wsp_header_uri,
tvb, URIOffset, uriLen, ENC_ASCII|ENC_NA);
- str = tvb_format_text (tvb, URIOffset, uriLen);
- /* XXX - tvb_format_text() returns a pointer to a static text string
+ str = tvb_format_text (pinfo->pool, tvb, URIOffset, uriLen);
+ /* XXX - tvb_format_text(pinfo->pool, ) returns a pointer to a static text string
* so please DO NOT attempt at g_free()ing it!
*/
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", str);
diff --git a/epan/dissectors/packet-x509if.c b/epan/dissectors/packet-x509if.c
index 89c172268a..6f57ff6178 100644
--- a/epan/dissectors/packet-x509if.c
+++ b/epan/dissectors/packet-x509if.c
@@ -773,7 +773,7 @@ dissect_x509if_T_atadv_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
if(out_tvb) {
/* it was a string - format it */
- value = tvb_format_text(out_tvb, 0, tvb_reported_length(out_tvb));
+ value = tvb_format_text(actx->pinfo->pool, out_tvb, 0, tvb_reported_length(out_tvb));
if(last_rdn) {
(void) g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c
index abbedd94ca..b8fef92261 100644
--- a/epan/dissectors/packet-xml.c
+++ b/epan/dissectors/packet-xml.c
@@ -413,7 +413,7 @@ static void after_token(void *tvbparse_data, const void *wanted_data _U_, tvbpar
pi = proto_tree_add_item(current_frame->tree, hfid, tok->tvb, tok->offset, tok->len, ENC_UTF_8|ENC_NA);
proto_item_set_text(pi, "%s",
- tvb_format_text(tok->tvb, tok->offset, tok->len));
+ tvb_format_text(wmem_packet_scope(), tok->tvb, tok->offset, tok->len));
if (is_cdata) {
new_frame = wmem_new(wmem_packet_scope(), xml_frame_t);
@@ -457,7 +457,7 @@ static void before_xmpli(void *tvbparse_data, const void *wanted_data _U_, tvbpa
pi = proto_tree_add_item(current_frame->tree, hf_tag, tok->tvb, tok->offset, tok->len, ENC_UTF_8|ENC_NA);
- proto_item_set_text(pi, "%s", tvb_format_text(tok->tvb, tok->offset, (name_tok->offset - tok->offset) + name_tok->len));
+ proto_item_set_text(pi, "%s", tvb_format_text(wmem_packet_scope(), tok->tvb, tok->offset, (name_tok->offset - tok->offset) + name_tok->len));
pt = proto_item_add_subtree(pi, ett);
@@ -545,7 +545,7 @@ static void before_tag(void *tvbparse_data, const void *wanted_data _U_, tvbpars
}
pi = proto_tree_add_item(current_frame->tree, ns->hf_tag, tok->tvb, tok->offset, tok->len, ENC_UTF_8|ENC_NA);
- proto_item_set_text(pi, "%s", tvb_format_text(tok->tvb,
+ proto_item_set_text(pi, "%s", tvb_format_text(wmem_packet_scope(), tok->tvb,
tok->offset,
(name_tok->offset - tok->offset) + name_tok->len));
@@ -620,7 +620,7 @@ static void before_dtd_doctype(void *tvbparse_data, const void *wanted_data _U_,
name_tok->tvb, name_tok->offset,
name_tok->len, ENC_ASCII|ENC_NA);
- proto_item_set_text(dtd_item, "%s", tvb_format_text(tok->tvb, tok->offset, tok->len));
+ proto_item_set_text(dtd_item, "%s", tvb_format_text(wmem_packet_scope(), tok->tvb, tok->offset, tok->len));
new_frame = wmem_new(wmem_packet_scope(), xml_frame_t);
new_frame->type = XML_FRAME_DTD_DOCTYPE;
@@ -698,7 +698,7 @@ static void after_attrib(void *tvbparse_data, const void *wanted_data _U_, tvbpa
}
pi = proto_tree_add_item(current_frame->tree, hfid, value->tvb, value->offset, value->len, ENC_UTF_8|ENC_NA);
- proto_item_set_text(pi, "%s", tvb_format_text(tok->tvb, tok->offset, tok->len));
+ proto_item_set_text(pi, "%s", tvb_format_text(wmem_packet_scope(), tok->tvb, tok->offset, tok->len));
current_frame->last_item = pi;
diff --git a/epan/dissectors/packet-ymsg.c b/epan/dissectors/packet-ymsg.c
index 1e47f9ee78..dbccf5926a 100644
--- a/epan/dissectors/packet-ymsg.c
+++ b/epan/dissectors/packet-ymsg.c
@@ -429,12 +429,12 @@ dissect_ymsg_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
/* Get the length of the key */
keylen = get_content_item_length(tvb, offset);
/* Extract the key */
- keybuf = tvb_format_text(tvb, offset, keylen);
+ keybuf = tvb_format_text(pinfo->pool, tvb, offset, keylen);
/* Get the length of the value */
vallen = get_content_item_length(tvb, offset+keylen+2);
/* Extract the value */
- valbuf = tvb_format_text(tvb, offset+keylen+2, vallen);
+ valbuf = tvb_format_text(pinfo->pool, tvb, offset+keylen+2, vallen);
/* Add a text item with the key... */
ti_2 = proto_tree_add_string_format(content_tree, hf_ymsg_content_line, tvb,
diff --git a/epan/dissectors/packet-zvt.c b/epan/dissectors/packet-zvt.c
index 5f89c0dc49..61a965204c 100644
--- a/epan/dissectors/packet-zvt.c
+++ b/epan/dissectors/packet-zvt.c
@@ -533,7 +533,7 @@ static inline gint dissect_zvt_tlv_characters_per_line(
tvbuff_t *tvb, gint offset, gint len,
packet_info *pinfo _U_, proto_tree *tree, tlv_seq_info_t *seq_info _U_)
{
- const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset, 1, NULL, FALSE);
+ const gchar *str = tvb_bcd_dig_to_str_be(pinfo->pool, tvb, offset, 1, NULL, FALSE);
proto_tree_add_string(tree, hf_zvt_characters_per_line, tvb, offset, 1, str);
return len;
}
@@ -730,7 +730,7 @@ static inline gint dissect_zvt_card_type(
static inline gint dissect_zvt_terminal_id(
tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree)
{
- const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset, 4, NULL, FALSE);
+ const gchar *str = tvb_bcd_dig_to_str_be(pinfo->pool, tvb, offset, 4, NULL, FALSE);
proto_tree_add_string(tree, hf_zvt_terminal_id, tvb, offset, 4, str);
return 4;
}
@@ -739,7 +739,7 @@ static inline gint dissect_zvt_terminal_id(
static inline gint dissect_zvt_amount(
tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree)
{
- const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset, 6, NULL, FALSE);
+ const gchar *str = tvb_bcd_dig_to_str_be(pinfo->pool, tvb, offset, 6, NULL, FALSE);
proto_tree_add_uint64(tree, hf_zvt_amount, tvb, offset, 6, g_ascii_strtoll(str,NULL,10));
return 6;
}
@@ -748,7 +748,7 @@ static inline gint dissect_zvt_amount(
static inline gint dissect_zvt_time(
tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree)
{
- const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset, 3, NULL, FALSE);
+ const gchar *str = tvb_bcd_dig_to_str_be(pinfo->pool, tvb, offset, 3, NULL, FALSE);
gchar *fstr = (char *)wmem_alloc(pinfo->pool, 9);
fstr[0] = str[0];
fstr[1] = str[1];
@@ -767,7 +767,7 @@ static inline gint dissect_zvt_time(
static inline gint dissect_zvt_date(
tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree)
{
- const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset, 2, NULL, FALSE);
+ const gchar *str = tvb_bcd_dig_to_str_be(pinfo->pool, tvb, offset, 2, NULL, FALSE);
gchar *fstr = (char *)wmem_alloc(pinfo->pool, 6);
fstr[0] = str[0];
fstr[1] = str[1];
@@ -783,7 +783,7 @@ static inline gint dissect_zvt_date(
static inline gint dissect_zvt_expiry_date(
tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree)
{
- const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset, 2, NULL, FALSE);
+ const gchar *str = tvb_bcd_dig_to_str_be(pinfo->pool, tvb, offset, 2, NULL, FALSE);
gchar *fstr = (char *)wmem_alloc(pinfo->pool, 6);
fstr[0] = str[0];
fstr[1] = str[1];
@@ -799,7 +799,7 @@ static inline gint dissect_zvt_expiry_date(
static inline gint dissect_zvt_trace_number(
tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree)
{
- const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset, 3, NULL, FALSE);
+ const gchar *str = tvb_bcd_dig_to_str_be(pinfo->pool, tvb, offset, 3, NULL, FALSE);
proto_tree_add_string(tree, hf_zvt_trace_number, tvb, offset, 3, str);
return 3;
}
@@ -811,7 +811,7 @@ static inline gint dissect_zvt_card_number(
guint8 tens = tvb_get_guint8(tvb, offset) & 0x0f;
guint8 ones = tvb_get_guint8(tvb, offset + 1) & 0x0f;
guint8 length = tens * 10 + ones;
- const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset + 2, length, NULL, FALSE);
+ const gchar *str = tvb_bcd_dig_to_str_be(pinfo->pool, tvb, offset + 2, length, NULL, FALSE);
proto_tree_add_string(tree, hf_zvt_card_number, tvb, offset + 2, length, str);
return 2 + length;
}
diff --git a/epan/proto.c b/epan/proto.c
index 9423faa3f9..9e87f372de 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1439,7 +1439,7 @@ proto_tree_add_format_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint len
TRY_TO_FAKE_THIS_REPR(pi);
- proto_item_set_text(pi, "%s", tvb_format_text(tvb, start, length));
+ proto_item_set_text(pi, "%s", tvb_format_text(tree->tree_data->pinfo->pool, tvb, start, length));
return pi;
}
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index 7a1d7956b9..c44bca3338 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -1661,8 +1661,8 @@ GByteArray*
tvb_get_string_bytes(tvbuff_t *tvb, const gint offset, const gint length,
const guint encoding, GByteArray *bytes, gint *endoff)
{
- const gchar *ptr = (gchar*) tvb_get_raw_string(wmem_packet_scope(), tvb, offset, length);
- const gchar *begin = ptr;
+ gchar *ptr;
+ const gchar *begin;
const gchar *end = NULL;
GByteArray *retval = NULL;
@@ -1670,6 +1670,9 @@ tvb_get_string_bytes(tvbuff_t *tvb, const gint offset, const gint length,
validate_single_byte_ascii_encoding(encoding);
+ ptr = (gchar*) tvb_get_raw_string(NULL, tvb, offset, length);
+ begin = ptr;
+
if (endoff) *endoff = 0;
while (*begin == ' ') begin++;
@@ -1684,6 +1687,8 @@ tvb_get_string_bytes(tvbuff_t *tvb, const gint offset, const gint length,
}
}
+ wmem_free(NULL, ptr);
+
return retval;
}
@@ -1706,8 +1711,8 @@ nstime_t*
tvb_get_string_time(tvbuff_t *tvb, const gint offset, const gint length,
const guint encoding, nstime_t *ns, gint *endoff)
{
- const gchar *begin = (gchar*) tvb_get_raw_string(wmem_packet_scope(), tvb, offset, length);
- const gchar *ptr = begin;
+ gchar *begin;
+ const gchar *ptr;
const gchar *end = NULL;
struct tm tm;
nstime_t* retval = NULL;
@@ -1723,6 +1728,9 @@ tvb_get_string_time(tvbuff_t *tvb, const gint offset, const gint length,
DISSECTOR_ASSERT(ns);
+ begin = (gchar*) tvb_get_raw_string(NULL, tvb, offset, length);
+ ptr = begin;
+
memset(&tm, 0, sizeof(tm));
tm.tm_isdst = -1;
ns->secs = 0;
@@ -1916,6 +1924,8 @@ tvb_get_string_time(tvbuff_t *tvb, const gint offset, const gint length,
*endoff = (gint)(offset + (end - begin));
}
+ wmem_free(NULL, begin);
+
return retval;
}
@@ -2455,7 +2465,7 @@ tvb_memeql(tvbuff_t *tvb, const gint offset, const guint8 *str, size_t size)
* wmem packet_scoped so call must be in that scope.
*/
gchar *
-tvb_format_text(tvbuff_t *tvb, const gint offset, const gint size)
+tvb_format_text(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint size)
{
const guint8 *ptr;
gint len;
@@ -2463,7 +2473,7 @@ tvb_format_text(tvbuff_t *tvb, const gint offset, const gint size)
len = (size > 0) ? size : 0;
ptr = ensure_contiguous(tvb, offset, size);
- return format_text(wmem_packet_scope(), ptr, len);
+ return format_text(scope, ptr, len);
}
/*
@@ -2487,7 +2497,7 @@ tvb_format_text_wsp(wmem_allocator_t* allocator, tvbuff_t *tvb, const gint offse
* so call must be in that scope.
*/
gchar *
-tvb_format_stringzpad(tvbuff_t *tvb, const gint offset, const gint size)
+tvb_format_stringzpad(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint size)
{
const guint8 *ptr, *p;
gint len;
@@ -2498,7 +2508,7 @@ tvb_format_stringzpad(tvbuff_t *tvb, const gint offset, const gint size)
ptr = ensure_contiguous(tvb, offset, size);
for (p = ptr, stringlen = 0; stringlen < len && *p != '\0'; p++, stringlen++)
;
- return format_text(wmem_packet_scope(), ptr, stringlen);
+ return format_text(scope, ptr, stringlen);
}
/*
@@ -4305,21 +4315,21 @@ tvb_get_bcd_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, gi
/* XXXX Fix me - needs odd indicator added */
const gchar *
-tvb_bcd_dig_to_wmem_packet_str(tvbuff_t *tvb, const gint offset, const gint len, const dgt_set_t *dgt, gboolean skip_first)
+tvb_bcd_dig_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint len, const dgt_set_t *dgt, gboolean skip_first)
{
if (!dgt)
dgt = &Dgt0_9_bcd;
- return tvb_get_bcd_string(wmem_packet_scope(), tvb, offset, len, dgt, skip_first, FALSE, FALSE);
+ return tvb_get_bcd_string(scope, tvb, offset, len, dgt, skip_first, FALSE, FALSE);
}
const gchar *
-tvb_bcd_dig_to_wmem_packet_str_be(tvbuff_t *tvb, const gint offset, const gint len, const dgt_set_t *dgt, gboolean skip_first)
+tvb_bcd_dig_to_str_be(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint len, const dgt_set_t *dgt, gboolean skip_first)
{
if (!dgt)
dgt = &Dgt0_9_bcd;
- return tvb_get_bcd_string(wmem_packet_scope(), tvb, offset, len, dgt, skip_first, FALSE, TRUE);
+ return tvb_get_bcd_string(scope, tvb, offset, len, dgt, skip_first, FALSE, TRUE);
}
/*
diff --git a/epan/tvbuff.h b/epan/tvbuff.h
index f6030d6adf..63b17e022d 100644
--- a/epan/tvbuff.h
+++ b/epan/tvbuff.h
@@ -544,10 +544,9 @@ WS_DLL_PUBLIC gint tvb_strnlen(tvbuff_t *tvb, const gint offset,
const guint maxlength);
/**
- * Format the data in the tvb from offset for size. Returned string is
- * wmem packet_scoped so call must be in that scope.
+ * Format the data in the tvb from offset for size.
*/
-WS_DLL_PUBLIC gchar *tvb_format_text(tvbuff_t *tvb, const gint offset,
+WS_DLL_PUBLIC gchar *tvb_format_text(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset,
const gint size);
/**
@@ -559,10 +558,9 @@ WS_DLL_PUBLIC gchar *tvb_format_text_wsp(wmem_allocator_t* allocator, tvbuff_t *
/**
* Like "tvb_format_text()", but for null-padded strings; don't show
- * the null padding characters as "\000". Returned string is wmem packet_scoped
- * so call must be in that scope.
+ * the null padding characters as "\000".
*/
-extern gchar *tvb_format_stringzpad(tvbuff_t *tvb, const gint offset,
+extern gchar *tvb_format_stringzpad(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset,
const gint size);
/**
@@ -931,7 +929,7 @@ WS_DLL_PUBLIC gchar *tvb_bytes_to_str(wmem_allocator_t *allocator, tvbuff_t *tvb
* tvbuff"), fetch BCD encoded digits from a tvbuff starting from either
* the low or high half byte, formatting the digits according to an input digit
* set, if NUL a default digit set of 0-9 returning "?" for overdecadic digits
- * will be used. A pointer to the packet-scope (WMEM-allocated) string will
+ * will be used. A pointer to the WMEM-allocated string will
* be returned. Note a tvbuff content of 0xf is considered a 'filler' and will
* end the conversion.
*/
@@ -941,8 +939,8 @@ typedef struct dgt_set_t
}
dgt_set_t;
-WS_DLL_PUBLIC const gchar *tvb_bcd_dig_to_wmem_packet_str(tvbuff_t *tvb,
- const gint offset, const gint len, const dgt_set_t *dgt,
+WS_DLL_PUBLIC const gchar *tvb_bcd_dig_to_str(wmem_allocator_t *scope,
+ tvbuff_t *tvb, const gint offset, const gint len, const dgt_set_t *dgt,
gboolean skip_first);
/**
@@ -951,13 +949,13 @@ WS_DLL_PUBLIC const gchar *tvb_bcd_dig_to_wmem_packet_str(tvbuff_t *tvb,
* tvbuff"), fetch BCD encoded digits from a tvbuff starting from either
* the low or high half byte, formatting the digits according to an input digit
* set, if NUL a default digit set of 0-9 returning "?" for overdecadic digits
- * will be used. A pointer to the packet-scope (WMEM-allocated) string will
+ * will be used. A pointer to the WMEM-allocated string will
* be returned. Note a tvbuff content of 0xf is considered a 'filler' and will
* end the conversion. Function uses big endian convetion: first digit is based
* on high order nibble, second digit is based on low order nibble.
*/
-WS_DLL_PUBLIC const gchar *tvb_bcd_dig_to_wmem_packet_str_be(tvbuff_t *tvb,
- const gint offset, const gint len, const dgt_set_t *dgt,
+WS_DLL_PUBLIC const gchar *tvb_bcd_dig_to_str_be(wmem_allocator_t *scope,
+ tvbuff_t *tvb, const gint offset, const gint len, const dgt_set_t *dgt,
gboolean skip_first);
/**