aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-07-21 23:59:18 +0200
committerAnders Broman <a.broman58@gmail.com>2015-07-22 12:50:25 +0000
commit3f0f49df661a9b3b9f1f8952a30829bc778c3611 (patch)
tree08737e5a4947fbbb0e9ca447cf8e531c607df2b2 /epan/dissectors
parent120ed14f3469306907590c7154ee9a1268747cc4 (diff)
Use pinfo pool and not packet pool for AT_STRINGZ addresses
Change-Id: I474e6554b352147702eac32d5574f8ab4a1ab84d Reviewed-on: https://code.wireshark.org/review/9745 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-dbus.c10
-rw-r--r--epan/dissectors/packet-sccp.c2
-rw-r--r--epan/dissectors/packet-sua.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-dbus.c b/epan/dissectors/packet-dbus.c
index 977876d593..e336e51acf 100644
--- a/epan/dissectors/packet-dbus.c
+++ b/epan/dissectors/packet-dbus.c
@@ -355,7 +355,7 @@ dissect_dbus_sig(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset
}
static int
-dissect_dbus_field_signature(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset, int field_code)
+dissect_dbus_field_signature(tvbuff_t *tvb, packet_info *pinfo, dbus_info_t *dinfo, proto_tree *tree, int offset, int field_code)
{
const int org_offset = offset;
@@ -397,7 +397,7 @@ dissect_dbus_field_signature(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree
offset = dissect_dbus_sig(tvb, dinfo, tree, offset, 's', &addr_val);
if (offset != -1)
SET_ADDRESS((field_code == DBUS_HEADER_FIELD_DESTINATION) ? &dinfo->pinfo->dst : &dinfo->pinfo->src,
- AT_STRINGZ, (int)strlen(addr_val.str)+1, addr_val.str);
+ AT_STRINGZ, (int)strlen(addr_val.str)+1, wmem_strdup(pinfo->pool, addr_val.str));
return offset;
}
break;
@@ -426,7 +426,7 @@ dissect_dbus_field_signature(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree
}
static int
-dissect_dbus_hdr_fields(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset)
+dissect_dbus_hdr_fields(tvbuff_t *tvb, packet_info *pinfo, dbus_info_t *dinfo, proto_tree *tree, int offset)
{
int end_offset;
@@ -446,7 +446,7 @@ dissect_dbus_hdr_fields(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int
proto_item_append_text(ti, ": %s", val_to_str(field_code, field_code_vals, "Unknown: %d"));
offset += 1;
- offset = dissect_dbus_field_signature(tvb, dinfo, field_tree, offset, field_code);
+ offset = dissect_dbus_field_signature(tvb, pinfo, dinfo, field_tree, offset, field_code);
if (offset == -1)
break;
@@ -573,7 +573,7 @@ dissect_dbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
offset = 0;
offset = dissect_dbus_hdr(tvb, &dinfo, dbus_tree, offset);
- offset = dissect_dbus_hdr_fields(tvb, &dinfo, dbus_tree, offset);
+ offset = dissect_dbus_hdr_fields(tvb, pinfo, &dinfo, dbus_tree, offset);
/* header aligned to 8B */
offset = (offset + 7) & ~7;
diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c
index 31ad19b858..f78b0bdab1 100644
--- a/epan/dissectors/packet-sccp.c
+++ b/epan/dissectors/packet-sccp.c
@@ -1615,7 +1615,7 @@ dissect_sccp_gt_address_information(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *digits_tree;
char *gt_digits;
- gt_digits = (char *)wmem_alloc0(wmem_packet_scope(), GT_MAX_SIGNALS+1);
+ gt_digits = (char *)wmem_alloc0(pinfo->pool, GT_MAX_SIGNALS+1);
while (offset < length) {
odd_signal = tvb_get_guint8(tvb, offset) & GT_ODD_SIGNAL_MASK;
diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c
index 645cfd504e..09ea109c4f 100644
--- a/epan/dissectors/packet-sua.c
+++ b/epan/dissectors/packet-sua.c
@@ -2246,9 +2246,9 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t
SET_ADDRESS(&pinfo->dst, AT_SS7PC, sizeof(mtp3_addr_pc_t), (guint8 *) sua_dpc);
if (sua_source_gt)
- SET_ADDRESS(&pinfo->src, AT_STRINGZ, 1+(int)strlen(sua_source_gt), sua_source_gt);
+ SET_ADDRESS(&pinfo->src, AT_STRINGZ, 1+(int)strlen(sua_source_gt), wmem_strdup(pinfo->pool, sua_source_gt));
if (sua_destination_gt)
- SET_ADDRESS(&pinfo->dst, AT_STRINGZ, 1+(int)strlen(sua_destination_gt), sua_destination_gt);
+ SET_ADDRESS(&pinfo->dst, AT_STRINGZ, 1+(int)strlen(sua_destination_gt), wmem_strdup(pinfo->pool, sua_destination_gt));
}
/* If there was SUA data it could be dissected */