aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-q931.c
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/dissectors/packet-q931.c
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/dissectors/packet-q931.c')
-rw-r--r--epan/dissectors/packet-q931.c4
1 files changed, 2 insertions, 2 deletions
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));
}
}