diff options
author | Evan Huus <eapache@gmail.com> | 2021-07-23 15:21:02 -0400 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-07-26 15:30:11 +0000 |
commit | e69446aa55d293412002375a549e85327267e65b (patch) | |
tree | 784bba0753e5f961df780eb5c9c613828cefca83 /epan/dissectors/asn1 | |
parent | 3467b98eb72f8971c83b25b920419b8d0d49016a (diff) |
asn1: convert most dissectors to pinfo->pool
Part 1/2 as the commits were too big for CI.
Largely find/replace, with a few manual tweaks. Then regenerate the asn1
dissector sources and make sure everything still builds. There are a
handful of cases I skipped as too complex, but this covers most of the
asn1 dissectors.
Diffstat (limited to 'epan/dissectors/asn1')
33 files changed, 154 insertions, 154 deletions
diff --git a/epan/dissectors/asn1/acse/acse.cnf b/epan/dissectors/asn1/acse/acse.cnf index 48c615dbe9..8676d687a4 100644 --- a/epan/dissectors/asn1/acse/acse.cnf +++ b/epan/dissectors/asn1/acse/acse.cnf @@ -88,7 +88,7 @@ PDV-list/presentation-data-values/octet-aligned pDVList_octet_aligned /* look up the indirect reference */ if((oid = find_oid_by_pres_ctx_id(actx->pinfo, indir_ref)) != NULL) { - actx->external.direct_reference = wmem_strdup(wmem_packet_scope(), oid); + actx->external.direct_reference = wmem_strdup(actx->pinfo->pool, oid); actx->external.direct_ref_present = TRUE; } diff --git a/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c b/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c index 0de8f109ac..544517f9c5 100644 --- a/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c +++ b/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c @@ -387,8 +387,8 @@ update_saved_invokedata(packet_info *pinfo, struct ansi_tcap_private_t *p_privat guint8 *dst_str; const char *buf = NULL; - src_str = address_to_str(wmem_packet_scope(), src); - dst_str = address_to_str(wmem_packet_scope(), dst); + src_str = address_to_str(pinfo->pool, src); + dst_str = address_to_str(pinfo->pool, dst); /* Data from the TCAP dissector */ if ((!pinfo->fd->visited)&&(p_private_tcap->TransactionID_str)){ @@ -396,14 +396,14 @@ update_saved_invokedata(packet_info *pinfo, struct ansi_tcap_private_t *p_privat /* The hash string needs to contain src and dest to distiguish differnt flows */ switch(ansi_map_response_matching_type){ case ANSI_MAP_TID_ONLY: - buf = wmem_strdup(wmem_packet_scope(), p_private_tcap->TransactionID_str); + buf = wmem_strdup(pinfo->pool, p_private_tcap->TransactionID_str); break; case ANSI_MAP_TID_AND_SOURCE: - buf = wmem_strdup_printf(wmem_packet_scope(), "%s%s",p_private_tcap->TransactionID_str,src_str); + buf = wmem_strdup_printf(pinfo->pool, "%s%s",p_private_tcap->TransactionID_str,src_str); break; case ANSI_MAP_TID_SOURCE_AND_DEST: default: - buf = wmem_strdup_printf(wmem_packet_scope(), "%s%s%s",p_private_tcap->TransactionID_str,src_str,dst_str); + buf = wmem_strdup_printf(pinfo->pool, "%s%s%s",p_private_tcap->TransactionID_str,src_str,dst_str); break; } /* If the entry allready exists don't owervrite it */ @@ -617,7 +617,7 @@ dissect_ansi_map_min_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre subtree = proto_item_add_subtree(actx->created_item, ett_mintype); - proto_tree_add_item_ret_display_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_BCD_DIGITS_0_9, wmem_packet_scope(), &digit_str); + proto_tree_add_item_ret_display_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_BCD_DIGITS_0_9, pinfo->pool, &digit_str); proto_item_append_text(actx->created_item, " - %s", digit_str); } @@ -661,7 +661,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree if(octet_len == 0) return; offset++; - proto_tree_add_item_ret_display_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, -1, ENC_KEYPAD_BC_TBCD, wmem_packet_scope(), &digit_str); + proto_tree_add_item_ret_display_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, -1, ENC_KEYPAD_BC_TBCD, pinfo->pool, &digit_str); proto_item_append_text(actx->created_item, " - %s", digit_str); break; case 2: @@ -674,7 +674,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree return; offset++; proto_tree_add_item_ret_string(subtree, hf_ansi_map_ia5_digits, tvb, offset, tvb_reported_length_remaining(tvb,offset), - ENC_ASCII|ENC_NA, wmem_packet_scope(), &digits); + ENC_ASCII|ENC_NA, pinfo->pool, &digits); proto_item_append_text(actx->created_item, " - %s", digits); } break; @@ -702,7 +702,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree switch ((octet&0xf)){ case 1: /* BCD Coding */ - proto_tree_add_item_ret_display_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, -1, ENC_KEYPAD_BC_TBCD, wmem_packet_scope(), &digit_str); + proto_tree_add_item_ret_display_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, -1, ENC_KEYPAD_BC_TBCD, pinfo->pool, &digit_str); proto_item_append_text(actx->created_item, " - %s", digit_str); break; case 2: @@ -710,7 +710,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree const guint8* digits; /* IA5 Coding */ proto_tree_add_item_ret_string(subtree, hf_ansi_map_ia5_digits, tvb, offset, tvb_reported_length_remaining(tvb,offset), - ENC_ASCII|ENC_NA, wmem_packet_scope(), &digits); + ENC_ASCII|ENC_NA, pinfo->pool, &digits); proto_item_append_text(actx->created_item, " - %s", digits); } break; @@ -4307,12 +4307,12 @@ find_saved_invokedata(asn1_ctx_t *actx, struct ansi_tcap_private_t *p_private_tc guint8 *dst_str; char *buf; - buf=(char *)wmem_alloc(wmem_packet_scope(), 1024); + buf=(char *)wmem_alloc(actx->pinfo->pool, 1024); /* Data from the TCAP dissector */ /* The hash string needs to contain src and dest to distiguish differnt flows */ - src_str = address_to_str(wmem_packet_scope(), src); - dst_str = address_to_str(wmem_packet_scope(), dst); + src_str = address_to_str(actx->pinfo->pool, src); + dst_str = address_to_str(actx->pinfo->pool, dst); /* Reverse order to invoke */ switch(ansi_map_response_matching_type){ case ANSI_MAP_TID_ONLY: diff --git a/epan/dissectors/asn1/ansi_tcap/ansi_tcap.cnf b/epan/dissectors/asn1/ansi_tcap/ansi_tcap.cnf index 3e10decbb1..b24c798e14 100644 --- a/epan/dissectors/asn1/ansi_tcap/ansi_tcap.cnf +++ b/epan/dissectors/asn1/ansi_tcap/ansi_tcap.cnf @@ -177,9 +177,9 @@ if(next_tvb) { * in the 8 octets case. */ if (len > 4){ - ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(wmem_packet_scope(), next_tvb, 4,len-4); + ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(actx->pinfo->pool, next_tvb, 4,len-4); }else{ - ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(wmem_packet_scope(), next_tvb, 0,len); + ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(actx->pinfo->pool, next_tvb, 0,len); } } switch(len) { diff --git a/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c b/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c index 9beff44eee..1c7e8921ea 100644 --- a/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c +++ b/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c @@ -141,8 +141,8 @@ save_invoke_data(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U_){ gchar *src, *dst; char *buf; - src = address_to_str(wmem_packet_scope(), &(pinfo->src)); - dst = address_to_str(wmem_packet_scope(), &(pinfo->dst)); + src = address_to_str(pinfo->pool, &(pinfo->src)); + dst = address_to_str(pinfo->pool, &(pinfo->dst)); if ((!pinfo->fd->visited)&&(ansi_tcap_private.TransactionID_str)){ @@ -150,14 +150,14 @@ save_invoke_data(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U_){ /* The hash string needs to contain src and dest to distiguish differnt flows */ switch(ansi_tcap_response_matching_type){ case ANSI_TCAP_TID_ONLY: - buf = wmem_strdup(wmem_packet_scope(), ansi_tcap_private.TransactionID_str); + buf = wmem_strdup(pinfo->pool, ansi_tcap_private.TransactionID_str); break; case ANSI_TCAP_TID_AND_SOURCE: - buf = wmem_strdup_printf(wmem_packet_scope(), "%s%s",ansi_tcap_private.TransactionID_str,src); + buf = wmem_strdup_printf(pinfo->pool, "%s%s",ansi_tcap_private.TransactionID_str,src); break; case ANSI_TCAP_TID_SOURCE_AND_DEST: default: - buf = wmem_strdup_printf(wmem_packet_scope(), "%s%s%s",ansi_tcap_private.TransactionID_str,src,dst); + buf = wmem_strdup_printf(pinfo->pool, "%s%s%s",ansi_tcap_private.TransactionID_str,src,dst); break; } @@ -190,11 +190,11 @@ find_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U return FALSE; } - src = address_to_str(wmem_packet_scope(), &(pinfo->src)); - dst = address_to_str(wmem_packet_scope(), &(pinfo->dst)); + src = address_to_str(pinfo->pool, &(pinfo->src)); + dst = address_to_str(pinfo->pool, &(pinfo->dst)); /* The hash string needs to contain src and dest to distiguish differnt flows */ - buf = (char *)wmem_alloc(wmem_packet_scope(), MAX_TID_STR_LEN); + buf = (char *)wmem_alloc(pinfo->pool, MAX_TID_STR_LEN); buf[0] = '\0'; /* Reverse order to invoke */ switch(ansi_tcap_response_matching_type){ diff --git a/epan/dissectors/asn1/c1222/packet-c1222-template.c b/epan/dissectors/asn1/c1222/packet-c1222-template.c index 13de7f21d1..f9d25c9cb6 100644 --- a/epan/dissectors/asn1/c1222/packet-c1222-template.c +++ b/epan/dissectors/asn1/c1222/packet-c1222-template.c @@ -299,11 +299,11 @@ static uat_t *c1222_uat; #define FILL_START int length, start_offset = offset; #define FILL_TABLE(fieldname) \ length = offset - start_offset; \ - fieldname = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, start_offset, length); \ + fieldname = (guint8 *)tvb_memdup(actx->pinfo->pool, tvb, start_offset, length); \ fieldname##_len = length; #define FILL_TABLE_TRUNCATE(fieldname, len) \ length = 1 + 2*(offset - start_offset); \ - fieldname = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, start_offset, length); \ + fieldname = (guint8 *)tvb_memdup(actx->pinfo->pool, tvb, start_offset, length); \ fieldname##_len = len; #define FILL_TABLE_APTITLE(fieldname) \ length = offset - start_offset; \ @@ -311,7 +311,7 @@ static uat_t *c1222_uat; case 0x80: /* relative OID */ \ tvb_ensure_bytes_exist(tvb, start_offset, length); \ fieldname##_len = length + c1222_baseoid_len; \ - fieldname = (guint8 *)wmem_alloc(wmem_packet_scope(), fieldname##_len); \ + fieldname = (guint8 *)wmem_alloc(actx->pinfo->pool, fieldname##_len); \ fieldname[0] = 0x06; /* create absolute OID tag */ \ fieldname[1] = (fieldname##_len - 2) & 0xff; \ memcpy(&(fieldname[2]), c1222_baseoid, c1222_baseoid_len); \ @@ -319,7 +319,7 @@ static uat_t *c1222_uat; break; \ case 0x06: /* absolute OID */ \ default: \ - fieldname = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, start_offset, length); \ + fieldname = (guint8 *)tvb_memdup(actx->pinfo->pool, tvb, start_offset, length); \ fieldname##_len = length; \ break; \ } @@ -398,7 +398,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm user_id = tvb_get_ntohs(tvb, *offset); proto_tree_add_uint(tree, hf_c1222_logon_id, tvb, *offset, 2, user_id); *offset += 2; - proto_tree_add_item_ret_string(tree, hf_c1222_logon_user, tvb, *offset, 10, ENC_ASCII|ENC_NA, wmem_packet_scope(), &user_name); + proto_tree_add_item_ret_string(tree, hf_c1222_logon_user, tvb, *offset, 10, ENC_ASCII|ENC_NA, pinfo->pool, &user_name); *offset += 10; *length -= 12; proto_item_set_text(tree, "C12.22 EPSEM: %s (id %d, user \"%s\")", @@ -409,7 +409,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm break; case C1222_CMD_SECURITY: if (*length >= 20) { - proto_tree_add_item_ret_string(tree, hf_c1222_security_password, tvb, *offset, 20, ENC_ASCII|ENC_NA, wmem_packet_scope(), &password); + proto_tree_add_item_ret_string(tree, hf_c1222_security_password, tvb, *offset, 20, ENC_ASCII|ENC_NA, pinfo->pool, &password); *offset += 20; *length -= 20; if (*length >= 2) { @@ -433,7 +433,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm proto_tree_add_uint(tree, hf_c1222_auth_len, tvb, *offset, 1, auth_len); *offset += 1; if (*length >= auth_len) { - auth_req = tvb_bytes_to_str(wmem_packet_scope(), tvb, *offset, auth_len); + auth_req = tvb_bytes_to_str(pinfo->pool, tvb, *offset, auth_len); proto_tree_add_item(tree, hf_c1222_auth_data, tvb, *offset, auth_len, ENC_NA); *offset += auth_len; *length -= auth_len + 1; @@ -973,7 +973,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_ if (len2 <= 0) return offset; epsem_buffer = tvb_new_subset_remaining(tvb, offset); - buffer = (guchar *)tvb_memdup(wmem_packet_scope(), tvb, offset, len2); + buffer = (guchar *)tvb_memdup(pinfo->pool, tvb, offset, len2); if (c1222_decrypt) { if (!decrypt_packet(buffer, len2, FALSE)) { crypto_bad = TRUE; diff --git a/epan/dissectors/asn1/cdt/cdt.cnf b/epan/dissectors/asn1/cdt/cdt.cnf index 299ee1e7b2..4369bd69c1 100644 --- a/epan/dissectors/asn1/cdt/cdt.cnf +++ b/epan/dissectors/asn1/cdt/cdt.cnf @@ -49,7 +49,7 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt" %(DEFAULT_BODY)s if (obj_id) { - const char *name = oid_resolved_from_string (wmem_packet_scope(), obj_id); + const char *name = oid_resolved_from_string (actx->pinfo->pool, obj_id); if (!name) { name = obj_id; diff --git a/epan/dissectors/asn1/cms/cms.cnf b/epan/dissectors/asn1/cms/cms.cnf index 5b336f0b54..5ce647b941 100644 --- a/epan/dissectors/asn1/cms/cms.cnf +++ b/epan/dissectors/asn1/cms/cms.cnf @@ -134,7 +134,7 @@ FirmwarePackageLoadError/version fwErrorVersion %(DEFAULT_BODY)s if(object_identifier_id) { - name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id); + name = oid_resolved_from_string(actx->pinfo->pool, object_identifier_id); proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id); } @@ -178,7 +178,7 @@ FirmwarePackageLoadError/version fwErrorVersion %(DEFAULT_BODY)s if(object_identifier_id) { - name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id); + name = oid_resolved_from_string(actx->pinfo->pool, object_identifier_id); proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id); } @@ -210,7 +210,7 @@ FirmwarePackageLoadError/version fwErrorVersion %(DEFAULT_BODY)s if(object_identifier_id) { - name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id); + name = oid_resolved_from_string(actx->pinfo->pool, object_identifier_id); proto_item_append_text(tree, " %%s", name ? name : object_identifier_id); cap_tree = tree; } diff --git a/epan/dissectors/asn1/dop/packet-dop-template.c b/epan/dissectors/asn1/dop/packet-dop-template.c index 8dc4f9224e..3b7b1362db 100644 --- a/epan/dissectors/asn1/dop/packet-dop-template.c +++ b/epan/dissectors/asn1/dop/packet-dop-template.c @@ -67,7 +67,7 @@ static void append_oid(packet_info *pinfo, const char *oid) { const char *name = NULL; - name = oid_resolved_from_string(wmem_packet_scope(), oid); + name = oid_resolved_from_string(pinfo->pool, oid); col_append_fstr(pinfo->cinfo, COL_INFO, " %s", name ? name : oid); } @@ -78,7 +78,7 @@ call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet { char* binding_param; - binding_param = wmem_strdup_printf(wmem_packet_scope(), "%s.%s", base_string, binding_type ? binding_type : ""); + binding_param = wmem_strdup_printf(pinfo->pool, "%s.%s", base_string, binding_type ? binding_type : ""); col_append_fstr(pinfo->cinfo, COL_INFO, " %s", col_info); diff --git a/epan/dissectors/asn1/ess/packet-ess-template.c b/epan/dissectors/asn1/ess/packet-ess-template.c index 67ff31194c..c8d579f9c5 100644 --- a/epan/dissectors/asn1/ess/packet-ess-template.c +++ b/epan/dissectors/asn1/ess/packet-ess-template.c @@ -107,7 +107,7 @@ ess_dissect_attribute_flags (tvbuff_t *tvb, asn1_ctx_t *actx) guint i; tree = proto_item_add_subtree (actx->created_item, ett_Category_attributes); - value = (guint8 *)tvb_memdup (wmem_packet_scope(), tvb, 0, tvb_captured_length (tvb)); + value = (guint8 *)tvb_memdup (actx->pinfo->pool, tvb, 0, tvb_captured_length (tvb)); for (i = 0; i < num_ess_category_attributes; i++) { ess_category_attributes_t *u = &(ess_category_attributes[i]); diff --git a/epan/dissectors/asn1/goose/goose.cnf b/epan/dissectors/asn1/goose/goose.cnf index 27b12d92af..d70db3fb48 100644 --- a/epan/dissectors/asn1/goose/goose.cnf +++ b/epan/dissectors/asn1/goose/goose.cnf @@ -55,7 +55,7 @@ GOOSEpdu ts.secs = seconds; ts.nsecs = nanoseconds; - ptime = abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, TRUE); + ptime = abs_time_to_str(actx->pinfo->pool, &ts, ABSOLUTE_TIME_UTC, TRUE); if(hf_index >= 0) { diff --git a/epan/dissectors/asn1/goose/packet-goose-template.c b/epan/dissectors/asn1/goose/packet-goose-template.c index 665ad0115a..142a272ee0 100644 --- a/epan/dissectors/asn1/goose/packet-goose-template.c +++ b/epan/dissectors/asn1/goose/packet-goose-template.c @@ -157,7 +157,7 @@ dissect_goose(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, NULL }; - asn1_ctx.private_data = wmem_alloc(wmem_packet_scope(), GOOSE_CHK_DATA_LEN); + asn1_ctx.private_data = wmem_alloc(pinfo->pool, GOOSE_CHK_DATA_LEN); data_chk = (goose_chk_data_t *)asn1_ctx.private_data; col_set_str(pinfo->cinfo, COL_PROTOCOL, GOOSE_PNAME); @@ -223,7 +223,7 @@ dissect_rgoose(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - asn1_ctx.private_data = wmem_alloc(wmem_packet_scope(), GOOSE_CHK_DATA_LEN); + asn1_ctx.private_data = wmem_alloc(pinfo->pool, GOOSE_CHK_DATA_LEN); data_chk = (goose_chk_data_t *)asn1_ctx.private_data; col_set_str(pinfo->cinfo, COL_PROTOCOL, R_GOOSE_PNAME); diff --git a/epan/dissectors/asn1/gprscdr/gprscdr.cnf b/epan/dissectors/asn1/gprscdr/gprscdr.cnf index 36f65c60cd..8694ce6705 100644 --- a/epan/dissectors/asn1/gprscdr/gprscdr.cnf +++ b/epan/dissectors/asn1/gprscdr/gprscdr.cnf @@ -94,7 +94,7 @@ GPRSRecord tvb_get_guint8(parameter_tvb,3), /* Hour */ tvb_get_guint8(parameter_tvb,4), /* Minute */ tvb_get_guint8(parameter_tvb,5), /* Second */ - tvb_get_string_enc(wmem_packet_scope(), parameter_tvb,6,1,ENC_ASCII|ENC_NA), /* Sign */ + tvb_get_string_enc(actx->pinfo->pool, parameter_tvb,6,1,ENC_ASCII|ENC_NA), /* Sign */ tvb_get_guint8(parameter_tvb,7), /* Hour */ tvb_get_guint8(parameter_tvb,8) /* Minute */ ); diff --git a/epan/dissectors/asn1/gsm_map/gsm_map.cnf b/epan/dissectors/asn1/gsm_map/gsm_map.cnf index cefba242f1..abe0ac0009 100644 --- a/epan/dissectors/asn1/gsm_map/gsm_map.cnf +++ b/epan/dissectors/asn1/gsm_map/gsm_map.cnf @@ -1090,7 +1090,7 @@ MAP interfaces return offset; subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_apn_str); - proto_tree_add_item_ret_string(subtree, hf_gsm_apn_str, parameter_tvb, 0, -1, ENC_APN_STR | ENC_NA, wmem_packet_scope(), &apn_str); + proto_tree_add_item_ret_string(subtree, hf_gsm_apn_str, parameter_tvb, 0, -1, ENC_APN_STR | ENC_NA, actx->pinfo->pool, &apn_str); proto_item_append_text(actx->created_item, " - %%s", apn_str); diff --git a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c index f35bc1c574..38ab436ee5 100644 --- a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c +++ b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c @@ -570,9 +570,9 @@ dissect_gsm_map_ext2_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto { temp32 = qos_calc_ext_bitrate(oct); if (temp32 % 1000 == 0) - str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000); + str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000); else - str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32); + str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32); } proto_tree_add_uint_format_value(subtree, hf_gsm_map_qos_max_bitrate_downl_ext, tvb, offset, 1, oct, "%s (%u)", str, oct); @@ -591,9 +591,9 @@ dissect_gsm_map_ext2_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto { temp32 = qos_calc_ext_bitrate(oct); if (temp32 % 1000 == 0) - str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000); + str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000); else - str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32); + str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32); } proto_tree_add_uint_format_value(subtree, hf_gsm_map_qos_guar_bitrate_downl_ext, tvb, offset, 1, oct, "%s (%u)", str, oct); @@ -626,9 +626,9 @@ dissect_gsm_map_ext3_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto { temp32 = qos_calc_ext_bitrate(oct); if (temp32 % 1000 == 0) - str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000); + str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000); else - str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32); + str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32); } proto_tree_add_uint_format_value(subtree, hf_gsm_map_qos_max_bitrate_upl_ext, tvb, offset, 1, oct, "%s (%u)", str, oct); @@ -647,9 +647,9 @@ dissect_gsm_map_ext3_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto { temp32 = qos_calc_ext_bitrate(oct); if (temp32 % 1000 == 0) - str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000); + str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000); else - str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32); + str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32); } proto_tree_add_uint_format_value(subtree, hf_gsm_map_qos_guar_bitrate_upl_ext, tvb, offset, 1, oct, "%s (%u)", str, oct); @@ -2359,7 +2359,7 @@ dissect_gsm_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void asn1_ctx.subtree.top_tree = parent_tree; - gsm_map_priv = wmem_new0(wmem_packet_scope(), gsm_map_private_info_t); + gsm_map_priv = wmem_new0(pinfo->pool, gsm_map_private_info_t); gsm_map_priv->tcap_private = (struct tcap_private_t *)data; asn1_ctx.value_ptr = gsm_map_priv; @@ -2398,7 +2398,7 @@ dissect_gsm_map_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, asn1_ctx.subtree.top_tree = parent_tree; - gsm_map_priv = wmem_new0(wmem_packet_scope(), gsm_map_private_info_t); + gsm_map_priv = wmem_new0(pinfo->pool, gsm_map_private_info_t); gsm_map_priv->sccp_msg_info = (sccp_msg_info_t *)data; asn1_ctx.value_ptr = gsm_map_priv; diff --git a/epan/dissectors/asn1/h225/h225.cnf b/epan/dissectors/asn1/h225/h225.cnf index d02d825178..6b0a3ef578 100644 --- a/epan/dissectors/asn1/h225/h225.cnf +++ b/epan/dissectors/asn1/h225/h225.cnf @@ -748,7 +748,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber actx->value_ptr = &guid_tvb; %(DEFAULT_BODY)s if (guid_tvb) - tvb_get_ntohguid(guid_tvb, 0, call_id_guid = wmem_new(wmem_packet_scope(), e_guid_t)); + tvb_get_ntohguid(guid_tvb, 0, call_id_guid = wmem_new(actx->pinfo->pool, e_guid_t)); actx->value_ptr = NULL; #.END #---------------------------------------------------------------------------------------- @@ -898,7 +898,7 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); - if (gefx) gefx->id = wmem_strdup_printf(wmem_packet_scope(), "%%u", value_int); + if (gefx) gefx->id = wmem_strdup_printf(actx->pinfo->pool, "%%u", value_int); #.END #.FN_BODY GenericIdentifier/oid FN_VARIANT = _str VAL_PTR = &oid_str diff --git a/epan/dissectors/asn1/h245/h245.cnf b/epan/dissectors/asn1/h245/h245.cnf index 2cbc58a85b..d45b9f8248 100644 --- a/epan/dissectors/asn1/h245/h245.cnf +++ b/epan/dissectors/asn1/h245/h245.cnf @@ -221,7 +221,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format const gchar *olc_key; olc_info_t *olc_req; - upcoming_olc = (!actx->pinfo->fd->visited) ? wmem_new0(wmem_packet_scope(), olc_info_t) : NULL; + upcoming_olc = (!actx->pinfo->fd->visited) ? wmem_new0(actx->pinfo->pool, olc_info_t) : NULL; h223_fw_lc_num = 0; h223_rev_lc_num = 0; @@ -594,7 +594,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format %(DEFAULT_BODY)s if (gefx) { - gefx->subid = wmem_strdup_printf(wmem_packet_scope(), "%%u", subMessageIdentifier); + gefx->subid = wmem_strdup_printf(actx->pinfo->pool, "%%u", subMessageIdentifier); gef_ctx_update_key(gef_ctx_get(actx->private_data)); } if (hf_index == hf_h245_subMessageIdentifier_standard) @@ -726,7 +726,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); - if (gefx) gefx->id = wmem_strdup_printf(wmem_packet_scope(), "%%d", value_int); + if (gefx) gefx->id = wmem_strdup_printf(actx->pinfo->pool, "%%d", value_int); #.END #---------------------------------------------------------------------------------------- #.FN_BODY ParameterValue/booleanArray VAL_PTR = &value diff --git a/epan/dissectors/asn1/h245/packet-h245-template.c b/epan/dissectors/asn1/h245/packet-h245-template.c index 7fc0788ef9..d8687fb5e6 100644 --- a/epan/dissectors/asn1/h245/packet-h245-template.c +++ b/epan/dissectors/asn1/h245/packet-h245-template.c @@ -421,7 +421,7 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo /* assume that whilst there is more tvb data, there are more h245 commands */ while ( tvb_reported_length_remaining( tvb, offset>>3 )>0 ){ CLEANUP_PUSH(reset_h245_pi, NULL); - h245_pi=wmem_new(wmem_packet_scope(), h245_packet_info); + h245_pi=wmem_new(pinfo->pool, h245_packet_info); init_h245_packet_info(h245_pi); asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_h245_MultimediaSystemControlMessage(tvb, offset, &asn1_ctx, tr, hf_h245_pdu_type); diff --git a/epan/dissectors/asn1/h248/h248.cnf b/epan/dissectors/asn1/h248/h248.cnf index 7556a1b1b5..6f457c2875 100644 --- a/epan/dissectors/asn1/h248/h248.cnf +++ b/epan/dissectors/asn1/h248/h248.cnf @@ -322,7 +322,7 @@ SigParameterV1/value ABBREV=sig_param_value #.END #.FN_HDR TerminationID - curr_info.term = wmem_new0(wmem_packet_scope(), gcp_term_t); + curr_info.term = wmem_new0(actx->pinfo->pool, gcp_term_t); wild_term = GCP_WILDCARD_NONE; #.END @@ -359,13 +359,13 @@ SigParameterV1/value ABBREV=sig_param_value } if (curr_info.term->len) { - curr_info.term->buffer = (guint8 *)tvb_memdup(wmem_packet_scope(),new_tvb,0,curr_info.term->len); + curr_info.term->buffer = (guint8 *)tvb_memdup(actx->pinfo->pool,new_tvb,0,curr_info.term->len); if(term_info.str){ - curr_info.term->str = wmem_strdup_printf(wmem_packet_scope(), "%s %s", - bytestring_to_str(wmem_packet_scope(),curr_info.term->buffer,curr_info.term->len, 0), + curr_info.term->str = wmem_strdup_printf(actx->pinfo->pool, "%s %s", + bytestring_to_str(actx->pinfo->pool,curr_info.term->buffer,curr_info.term->len, 0), term_info.str); }else{ - curr_info.term->str = bytestring_to_str(wmem_packet_scope(),curr_info.term->buffer,curr_info.term->len, 0); + curr_info.term->str = bytestring_to_str(actx->pinfo->pool,curr_info.term->buffer,curr_info.term->len, 0); } } @@ -374,8 +374,8 @@ SigParameterV1/value ABBREV=sig_param_value } else { curr_info.term->len = 0; - curr_info.term->buffer = (guint8*)wmem_strdup(wmem_packet_scope(), ""); - curr_info.term->str = wmem_strdup(wmem_packet_scope(), "?"); + curr_info.term->buffer = (guint8*)wmem_strdup(actx->pinfo->pool, ""); + curr_info.term->str = wmem_strdup(actx->pinfo->pool, "?"); } #.END diff --git a/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf b/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf index 41810fc486..1d113e5fd5 100644 --- a/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf +++ b/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf @@ -70,7 +70,7 @@ EncryptedDataEncryptionKey/eciesBrainpoolP256r1 edekEciesBrainpoolP256r1 SspRange/opaque ABBREV=srRange.opaque #.FN_HDR Ieee1609Dot2Data - actx->private_data = (void*)wmem_new0(wmem_packet_scope(), ieee1609_private_data_t); + actx->private_data = (void*)wmem_new0(actx->pinfo->pool, ieee1609_private_data_t); #.END #.FN_BODY Ieee1609Dot2Content/unsecuredData diff --git a/epan/dissectors/asn1/its/its.cnf b/epan/dissectors/asn1/its/its.cnf index dee4c79914..0d0236ed7f 100644 --- a/epan/dissectors/asn1/its/its.cnf +++ b/epan/dissectors/asn1/its/its.cnf @@ -334,55 +334,55 @@ RegionId CauseCodeType #.FN_HDR CoopAwareness - actx->private_data = (void*)wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = (void*)wmem_new0(actx->pinfo->pool, its_private_data_t); col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "CAM"); col_set_str(actx->pinfo->cinfo, COL_INFO, "CAM"); #.END #.FN_HDR CoopAwarenessV1 - actx->private_data = (void*)wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = (void*)wmem_new0(actx->pinfo->pool, its_private_data_t); col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "CAMv1"); col_set_str(actx->pinfo->cinfo, COL_INFO, "CAMv1"); #.END #.FN_HDR DecentralizedEnvironmentalNotificationMessage - actx->private_data = (void*)wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = (void*)wmem_new0(actx->pinfo->pool, its_private_data_t); col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "DENM"); col_set_str(actx->pinfo->cinfo, COL_INFO, "DENM"); #.END #.FN_HDR DecentralizedEnvironmentalNotificationMessageV1 - actx->private_data = (void*)wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = (void*)wmem_new0(actx->pinfo->pool, its_private_data_t); col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "DENMv1"); col_set_str(actx->pinfo->cinfo, COL_INFO, "DENMv1"); #.END #.FN_HDR EVChargingSpotNotificationPOIMessage - actx->private_data = (void*)wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = (void*)wmem_new0(actx->pinfo->pool, its_private_data_t); col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "EVCSN"); col_set_str(actx->pinfo->cinfo, COL_INFO, "EVCSN"); #.END #.FN_HDR EV-RSR-MessageBody - actx->private_data = (void*)wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = (void*)wmem_new0(actx->pinfo->pool, its_private_data_t); col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "EV-RSR"); col_set_str(actx->pinfo->cinfo, COL_INFO, "EV-RSR"); #.END #.FN_HDR TisTpgTransaction - actx->private_data = (void*)wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = (void*)wmem_new0(actx->pinfo->pool, its_private_data_t); col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "TISTPG"); col_set_str(actx->pinfo->cinfo, COL_INFO, "TISTPG"); #.END #.FN_HDR IviStructure - actx->private_data = (void*)wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = (void*)wmem_new0(actx->pinfo->pool, its_private_data_t); col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "IVIM"); col_set_str(actx->pinfo->cinfo, COL_INFO, "IVIM"); #.END #.FN_HDR SignalStatusMessage - its_private_data_t *regext = wmem_new0(wmem_packet_scope(), its_private_data_t); + its_private_data_t *regext = wmem_new0(actx->pinfo->pool, its_private_data_t); actx->private_data = (void*)regext; col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "SSEM"); col_set_str(actx->pinfo->cinfo, COL_INFO, "SSEM"); @@ -390,7 +390,7 @@ CauseCodeType #.END #.FN_HDR SignalRequestMessage - its_private_data_t *regext = wmem_new0(wmem_packet_scope(), its_private_data_t); + its_private_data_t *regext = wmem_new0(actx->pinfo->pool, its_private_data_t); actx->private_data = (void*)regext; col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "SREM"); col_set_str(actx->pinfo->cinfo, COL_INFO, "SREM"); @@ -398,7 +398,7 @@ CauseCodeType #.END #.FN_HDR MapData - its_private_data_t *regext = wmem_new0(wmem_packet_scope(), its_private_data_t); + its_private_data_t *regext = wmem_new0(actx->pinfo->pool, its_private_data_t); actx->private_data = (void*)regext; col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "MAPEM"); col_set_str(actx->pinfo->cinfo, COL_INFO, "MAPEM"); @@ -406,7 +406,7 @@ CauseCodeType #.END #.FN_HDR SPAT - its_private_data_t *regext = wmem_new0(wmem_packet_scope(), its_private_data_t); + its_private_data_t *regext = wmem_new0(actx->pinfo->pool, its_private_data_t); actx->private_data = (void*)regext; col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "SPATEM"); col_set_str(actx->pinfo->cinfo, COL_INFO, "SPATEM"); @@ -415,7 +415,7 @@ CauseCodeType #.FN_HDR RTCMcorrections - its_private_data_t *regext = wmem_new0(wmem_packet_scope(), its_private_data_t); + its_private_data_t *regext = wmem_new0(actx->pinfo->pool, its_private_data_t); actx->private_data = (void*)regext; col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "RTCMEM"); col_set_str(actx->pinfo->cinfo, COL_INFO, "RTCMEM"); @@ -423,64 +423,64 @@ CauseCodeType #.END #.FN_HDR CollectivePerceptionMessage - actx->private_data = (void*)wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = (void*)wmem_new0(actx->pinfo->pool, its_private_data_t); col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "CPM"); col_set_str(actx->pinfo->cinfo, COL_INFO, "CPM"); #.END #.FN_HDR ConnectionManeuverAssist-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END #.FN_HDR ConnectionTrajectory-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END #.FN_HDR NodeAttributeSet-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END #.FN_HDR IntersectionState-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END #.FN_HDR MapData-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END #.FN_HDR Position3D-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END #.FN_HDR RestrictionUserType-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END #.FN_HDR SignalStatusPackage-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END #.FN_HDR LaneAttributes-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END #.FN_HDR MovementEvent-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END #.FN_HDR RequestorDescription-addGrpC - actx->private_data = wmem_new0(wmem_packet_scope(), its_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, its_private_data_t); #.END @@ -694,7 +694,7 @@ CauseCodeType return test_offset; } // Lets try it that way, regarless of version value... - its_header_t *hdr = wmem_new0(wmem_packet_scope(), its_header_t); + its_header_t *hdr = wmem_new0(actx->pinfo->pool, its_header_t); actx->private_data = (void*)hdr; %(DEFAULT_BODY)s tap_queue_packet(its_tap, actx->pinfo, actx->private_data); @@ -846,7 +846,7 @@ TrafficConditionSubCauseCode void *priv_data = actx->private_data; its_pt_activation_data_t *pta; - pta = wmem_new0(wmem_packet_scope(), its_pt_activation_data_t); + pta = wmem_new0(actx->pinfo->pool, its_pt_activation_data_t); actx->private_data = pta; #.FN_FTR dissector_try_uint_new(cam_pt_activation_table, pta->type, pta->data, actx->pinfo, tree, TRUE, NULL); diff --git a/epan/dissectors/asn1/kerberos/kerberos.cnf b/epan/dissectors/asn1/kerberos/kerberos.cnf index c60a926766..1dbb950cd5 100644 --- a/epan/dissectors/asn1/kerberos/kerberos.cnf +++ b/epan/dissectors/asn1/kerberos/kerberos.cnf @@ -293,7 +293,7 @@ KrbFastArmorTypes PROT_PREFIX UPPER_CASE int netbios_name_len = (NETBIOS_NAME_LEN - 1)*4 + 1; netbios_name_type = process_netbios_name(tvb_get_ptr(tvb, offset, 16), netbios_name, netbios_name_len); - address_str = wmem_strdup_printf(wmem_packet_scope(), "%s<%02x>", netbios_name, netbios_name_type); + address_str = wmem_strdup_printf(actx->pinfo->pool, "%s<%02x>", netbios_name, netbios_name_type); it=proto_tree_add_string_format(tree, hf_krb_address_netbios, tvb, offset, 16, netbios_name, "NetBIOS Name: %s (%s)", address_str, netbios_name_type_descr(netbios_name_type)); } break; diff --git a/epan/dissectors/asn1/kerberos/packet-kerberos-template.c b/epan/dissectors/asn1/kerberos/packet-kerberos-template.c index 397f558a92..89a3585965 100644 --- a/epan/dissectors/asn1/kerberos/packet-kerberos-template.c +++ b/epan/dissectors/asn1/kerberos/packet-kerberos-template.c @@ -678,7 +678,7 @@ add_encryption_key(packet_info *pinfo, * We already processed this, * we can use a shortterm scope */ - key_scope = wmem_packet_scope(); + key_scope = pinfo->pool; } else { /* * As long as we have enc_key_list, we need to @@ -925,7 +925,7 @@ static void missing_encryption_key(proto_tree *tree, packet_info *pinfo, proto_item *item = NULL; enc_key_t *mek = NULL; - mek = wmem_new0(wmem_packet_scope(), enc_key_t); + mek = wmem_new0(pinfo->pool, enc_key_t); g_snprintf(mek->key_origin, KRB_MAX_ORIG_LEN, "keytype %d usage %d missing in frame %u", keytype, usage, pinfo->num); @@ -1001,7 +1001,7 @@ static void missing_signing_key(proto_tree *tree, packet_info *pinfo, proto_item *item = NULL; enc_key_t *mek = NULL; - mek = wmem_new0(wmem_packet_scope(), enc_key_t); + mek = wmem_new0(pinfo->pool, enc_key_t); g_snprintf(mek->key_origin, KRB_MAX_ORIG_LEN, "checksum %d keytype %d missing in frame %u", checksum, keytype, pinfo->num); @@ -2419,7 +2419,7 @@ decrypt_krb5_data(proto_tree *tree _U_, packet_info *pinfo, keys. So just give it a copy of the crypto data instead. This has been seen for RC4-HMAC blobs. */ - cryptocopy = (guint8 *)wmem_memdup(wmem_packet_scope(), cryptotext, length); + cryptocopy = (guint8 *)wmem_memdup(pinfo->pool, cryptotext, length); ret = krb5_decrypt_ivec(krb5_ctx, crypto, usage, cryptocopy, length, &data, @@ -2659,7 +2659,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo, return NULL; } - decrypted_data = wmem_alloc(wmem_packet_scope(), length); + decrypted_data = wmem_alloc(pinfo->pool, length); for(ske = service_key_list; ske != NULL; ske = g_slist_next(ske)){ gboolean do_continue = FALSE; gboolean digest_ok; diff --git a/epan/dissectors/asn1/ldap/ldap.cnf b/epan/dissectors/asn1/ldap/ldap.cnf index 14228568c0..2a9f04869b 100644 --- a/epan/dissectors/asn1/ldap/ldap.cnf +++ b/epan/dissectors/asn1/ldap/ldap.cnf @@ -68,8 +68,8 @@ PasswordPolicyResponseValue B "1.3.6.1.4.1.42.2.27.8.5.1" "passwordPolicy" if (!parameter_tvb) return offset; - object_identifier_id = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA); - name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id); + object_identifier_id = tvb_get_string_enc(actx->pinfo->pool, parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA); + name = oid_resolved_from_string(actx->pinfo->pool, object_identifier_id); if(name){ proto_item_append_text(actx->created_item, " (%s)", name); @@ -310,14 +310,14 @@ ldap_conv_info_t *ldap_info; ldap_do_protocolop(actx->pinfo); if(parameter_tvb) - ldapstring = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA); + ldapstring = tvb_get_string_enc(actx->pinfo->pool, parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA); if(hf_index == hf_ldap_baseObject) { /* this is search - put it on the scanline */ if(!ldapstring || !*ldapstring) ldapstring = "<ROOT>"; - col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%%s\" ", format_text(wmem_packet_scope(), ldapstring, strlen(ldapstring))); + col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%%s\" ", format_text(actx->pinfo->pool, ldapstring, strlen(ldapstring))); if(ldm_tree) proto_item_append_text(ldm_tree, " \"%%s\"", ldapstring); @@ -329,7 +329,7 @@ ldap_conv_info_t *ldap_info; } } else if ((hf_index == hf_ldap_errorMessage) && ldapstring && *ldapstring) { /* only show message if not success */ - col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%%s) ", format_text(wmem_packet_scope(), ldapstring, strlen(ldapstring))); + col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%%s) ", format_text(actx->pinfo->pool, ldapstring, strlen(ldapstring))); if(ldm_tree) proto_item_append_text(ldm_tree, " (%%s)", ldapstring); @@ -343,7 +343,7 @@ ldap_conv_info_t *ldap_info; if(!ldapstring || !*ldapstring) ldapstring = "<ROOT>"; - col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%%s\" ", format_text(wmem_packet_scope(), ldapstring, strlen(ldapstring))); + col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%%s\" ", format_text(actx->pinfo->pool, ldapstring, strlen(ldapstring))); if(ldm_tree) proto_item_append_text(ldm_tree, " \"%%s\"", ldapstring); @@ -367,7 +367,7 @@ ldap_conv_info_t *ldap_info; Filter_string=ldapstring; } else if (hf_index == hf_ldap_type) { /* remember attribute type name */ - attr_type = wmem_strdup(wmem_packet_scope(), ldapstring); + attr_type = wmem_strdup(actx->pinfo->pool, ldapstring); /* append it to the parent entry */ proto_item_append_text(tree, " %%s", attr_type); @@ -471,7 +471,7 @@ ldap_conv_info_t *ldap_info; %(DEFAULT_BODY)s if(tvb_ascii_isprint(next_tvb, 0, tvb_reported_length(next_tvb))) { - string = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_reported_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA); + string = tvb_get_string_enc(actx->pinfo->pool, next_tvb, 0, tvb_reported_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA); proto_item_set_text(actx->created_item, "AttributeValue: %%s", string); } } @@ -522,31 +522,31 @@ ldap_conv_info_t *ldap_info; Filter_length = 0; #.FN_FTR Filter/equalityMatch - Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s=%s)", + Filter_string=wmem_strdup_printf(actx->pinfo->pool, "(%s=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); #.FN_FTR Filter/greaterOrEqual - Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s>=%s)", + Filter_string=wmem_strdup_printf(actx->pinfo->pool, "(%s>=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); #.FN_FTR Filter/lessOrEqual - Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s<=%s)", + Filter_string=wmem_strdup_printf(actx->pinfo->pool, "(%s<=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); #.FN_FTR Filter/approxMatch - Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s~=%s)", + Filter_string=wmem_strdup_printf(actx->pinfo->pool, "(%s~=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); #.FN_FTR Filter/and/_item if(and_filter_string){ - and_filter_string=wmem_strdup_printf(wmem_packet_scope(), "(&%s%s)",and_filter_string,Filter_string); + and_filter_string=wmem_strdup_printf(actx->pinfo->pool, "(&%s%s)",and_filter_string,Filter_string); } else { and_filter_string=Filter_string; } @@ -565,13 +565,13 @@ ldap_conv_info_t *ldap_info; if(and_filter_string) { proto_item_append_text(it, "%%s", and_filter_string); - Filter_string=wmem_strdup(wmem_packet_scope(), and_filter_string); + Filter_string=wmem_strdup(actx->pinfo->pool, and_filter_string); } and_filter_string=old_and_filter_string; #.FN_FTR Filter/or/_item if(or_filter_string){ - or_filter_string=wmem_strdup_printf(wmem_packet_scope(), "(|%s%s)",or_filter_string,Filter_string); + or_filter_string=wmem_strdup_printf(actx->pinfo->pool, "(|%s%s)",or_filter_string,Filter_string); } else { or_filter_string=Filter_string; } @@ -589,15 +589,15 @@ ldap_conv_info_t *ldap_info; %(DEFAULT_BODY)s if(or_filter_string) { proto_item_append_text(it, "%%s", or_filter_string); - Filter_string=wmem_strdup(wmem_packet_scope(), or_filter_string); + Filter_string=wmem_strdup(actx->pinfo->pool, or_filter_string); } or_filter_string=old_or_filter_string; #.FN_FTR Filter/present - Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s=*)",string_or_null(Filter_string)); + Filter_string=wmem_strdup_printf(actx->pinfo->pool, "(%s=*)",string_or_null(Filter_string)); #.FN_FTR Filter/not - Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(!%s)",string_or_null(Filter_string)); + Filter_string=wmem_strdup_printf(actx->pinfo->pool, "(!%s)",string_or_null(Filter_string)); #.FN_BODY MatchingRuleAssertion/dnAttributes gboolean val; @@ -615,7 +615,7 @@ ldap_conv_info_t *ldap_info; matching_rule_dnattr=FALSE; #.FN_FTR Filter/extensibleMatch - Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s:%s%s%s=%s)", + Filter_string=wmem_strdup_printf(actx->pinfo->pool, "(%s:%s%s%s=%s)", (attr_type?attr_type:""), (matching_rule_dnattr?"dn:":""), (matching_rule_string?matching_rule_string:""), @@ -624,15 +624,15 @@ ldap_conv_info_t *ldap_info; #.FN_FTR SubstringFilter/substrings/_item if (substring_item_final) { - substring_value=wmem_strdup_printf(wmem_packet_scope(), "%s%s", + substring_value=wmem_strdup_printf(actx->pinfo->pool, "%s%s", (substring_value?substring_value:"*"), substring_item_final); } else if (substring_item_any) { - substring_value=wmem_strdup_printf(wmem_packet_scope(), "%s%s*", + substring_value=wmem_strdup_printf(actx->pinfo->pool, "%s%s*", (substring_value?substring_value:"*"), substring_item_any); } else if (substring_item_init) { - substring_value=wmem_strdup_printf(wmem_packet_scope(), "%s*", + substring_value=wmem_strdup_printf(actx->pinfo->pool, "%s*", substring_item_init); } @@ -651,7 +651,7 @@ ldap_conv_info_t *ldap_info; tree = tr; %(DEFAULT_BODY)s - Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%%s=%%s)", + Filter_string=wmem_strdup_printf(actx->pinfo->pool, "(%%s=%%s)", string_or_null(attr_type), string_or_null(substring_value)); proto_item_append_text(it, "%%s", Filter_string); @@ -742,7 +742,7 @@ ldap_conv_info_t *ldap_info; #.FN_BODY IntermediateResponse/_untag/responseValue if(ldm_tree && object_identifier_id) { proto_item_set_text(ldm_tree, "%%s %%s", "IntermediateResponse", object_identifier_id); - name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id); + name = oid_resolved_from_string(actx->pinfo->pool, object_identifier_id); if(name) proto_item_append_text(ldm_tree, " (%%s)", name); } diff --git a/epan/dissectors/asn1/ldap/packet-ldap-template.c b/epan/dissectors/asn1/ldap/packet-ldap-template.c index 76e9fc7d9f..b931381999 100644 --- a/epan/dissectors/asn1/ldap/packet-ldap-template.c +++ b/epan/dissectors/asn1/ldap/packet-ldap-template.c @@ -676,7 +676,7 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, as /* This octet string contained a GUID */ dissect_dcerpc_uuid_t(tvb, offset, actx->pinfo, tree, drep, hf_ldap_guid, &uuid); - ldapvalue_string=(char*)wmem_alloc(wmem_packet_scope(), 1024); + ldapvalue_string=(char*)wmem_alloc(actx->pinfo->pool, 1024); g_snprintf(ldapvalue_string, 1023, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uuid.data1, uuid.data2, uuid.data3, uuid.data4[0], uuid.data4[1], uuid.data4[2], uuid.data4[3], uuid.data4[4], uuid.data4[5], @@ -690,7 +690,7 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, as /* get flag value to populate ldapvalue_string */ flags=tvb_get_letohl(tvb, offset); - ldapvalue_string=(char*)wmem_alloc(wmem_packet_scope(), 1024); + ldapvalue_string=(char*)wmem_alloc(actx->pinfo->pool, 1024); g_snprintf(ldapvalue_string, 1023, "0x%08x",flags); /* populate bitmask subtree */ @@ -717,9 +717,9 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, as /* convert the string into a printable string */ if(is_ascii){ - ldapvalue_string= tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_UTF_8|ENC_NA); + ldapvalue_string= tvb_get_string_enc(actx->pinfo->pool, tvb, offset, len, ENC_UTF_8|ENC_NA); } else { - ldapvalue_string= tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, offset, len, ':'); + ldapvalue_string= tvb_bytes_to_str_punct(actx->pinfo->pool, tvb, offset, len, ':'); } proto_tree_add_string(tree, hf_index, tvb, offset, len, ldapvalue_string); @@ -1654,12 +1654,12 @@ dissect_ldap_oid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* * proto_tree_add_oid() instead. */ - oid=tvb_get_string_enc(wmem_packet_scope(), tvb, 0, tvb_reported_length(tvb), ENC_UTF_8|ENC_NA); + oid=tvb_get_string_enc(pinfo->pool, tvb, 0, tvb_reported_length(tvb), ENC_UTF_8|ENC_NA); if(!oid){ return tvb_captured_length(tvb); } - oidname=oid_resolved_from_string(wmem_packet_scope(), oid); + oidname=oid_resolved_from_string(pinfo->pool, oid); if(oidname){ proto_tree_add_string_format_value(tree, hf_ldap_oid, tvb, 0, tvb_reported_length(tvb), oid, "%s (%s)",oid,oidname); @@ -1731,7 +1731,7 @@ dissect_ldap_guid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat /* This octet string contained a GUID */ dissect_dcerpc_uuid_t(tvb, 0, pinfo, tree, drep, hf_ldap_guid, &uuid); - ldapvalue_string=(char*)wmem_alloc(wmem_packet_scope(), 1024); + ldapvalue_string=(char*)wmem_alloc(pinfo->pool, 1024); g_snprintf(ldapvalue_string, 1023, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uuid.data1, uuid.data2, uuid.data3, uuid.data4[0], uuid.data4[1], uuid.data4[2], uuid.data4[3], uuid.data4[4], uuid.data4[5], diff --git a/epan/dissectors/asn1/lnpdqp/packet-lnpdqp-template.c b/epan/dissectors/asn1/lnpdqp/packet-lnpdqp-template.c index 60feddf6f5..cde4f9b17e 100644 --- a/epan/dissectors/asn1/lnpdqp/packet-lnpdqp-template.c +++ b/epan/dissectors/asn1/lnpdqp/packet-lnpdqp-template.c @@ -192,7 +192,7 @@ dissect_lnpdqp_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr if(no_of_digits == 0) return; offset++; - proto_tree_add_item_ret_display_string(subtree, hf_lnpdqp_bcd_digits, tvb, offset, -1, ENC_KEYPAD_BC_TBCD, wmem_packet_scope(), &digit_str); + proto_tree_add_item_ret_display_string(subtree, hf_lnpdqp_bcd_digits, tvb, offset, -1, ENC_KEYPAD_BC_TBCD, pinfo->pool, &digit_str); proto_item_append_text(actx->created_item, " - %s", digit_str); break; case 2: @@ -203,7 +203,7 @@ dissect_lnpdqp_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr return; offset++; proto_tree_add_item(subtree, hf_lnpdqp_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA); - proto_item_append_text(actx->created_item, " - %s", tvb_get_string_enc(wmem_packet_scope(),tvb,offset,tvb_reported_length_remaining(tvb,offset), ENC_ASCII | ENC_NA)); + proto_item_append_text(actx->created_item, " - %s", tvb_get_string_enc(pinfo->pool,tvb,offset,tvb_reported_length_remaining(tvb,offset), ENC_ASCII | ENC_NA)); break; default: break; diff --git a/epan/dissectors/asn1/lte-rrc/lte-rrc.cnf b/epan/dissectors/asn1/lte-rrc/lte-rrc.cnf index 49d63e8a28..da93846e50 100644 --- a/epan/dissectors/asn1/lte-rrc/lte-rrc.cnf +++ b/epan/dissectors/asn1/lte-rrc/lte-rrc.cnf @@ -1494,7 +1494,7 @@ LogMeasResultBT-r15/rssi-BT-r15 DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units 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); - hf_str = wmem_strdup_printf(wmem_packet_scope(), "%c%c-%c%c-%c%c %c%c:%c%c:%c%c", str[0], str[1], + 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/lte-rrc/packet-lte-rrc-template.c b/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c index ad3422ac0b..5d7ae27a04 100644 --- a/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c +++ b/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c @@ -2755,7 +2755,7 @@ static lte_rrc_private_data_t* lte_rrc_get_private_data(asn1_ctx_t *actx) } else { lte_rrc_private_data_t* new_struct = - wmem_new0(wmem_packet_scope(), lte_rrc_private_data_t); + wmem_new0(actx->pinfo->pool, lte_rrc_private_data_t); actx->private_data = new_struct; return new_struct; } @@ -2979,7 +2979,7 @@ dissect_lte_rrc_warningMessageSegment(tvbuff_t *warning_msg_seg_tvb, proto_tree cb_data_page_tvb = tvb_new_subset_length(warning_msg_seg_tvb, offset, length); cb_data_tvb = dissect_cbs_data(dataCodingScheme, cb_data_page_tvb, tree, pinfo, 0); if (cb_data_tvb) { - str = tvb_get_string_enc(wmem_packet_scope(), cb_data_tvb, 0, tvb_reported_length(cb_data_tvb), ENC_UTF_8|ENC_NA); + str = tvb_get_string_enc(pinfo->pool, cb_data_tvb, 0, tvb_reported_length(cb_data_tvb), ENC_UTF_8|ENC_NA); proto_tree_add_string_format(tree, hf_lte_rrc_warningMessageSegment_decoded_page, warning_msg_seg_tvb, offset, 83, str, "Decoded Page %u: %s", i+1, str); } diff --git a/epan/dissectors/asn1/mms/mms.cnf b/epan/dissectors/asn1/mms/mms.cnf index e37fbd75c5..060654cb43 100644 --- a/epan/dissectors/asn1/mms/mms.cnf +++ b/epan/dissectors/asn1/mms/mms.cnf @@ -109,7 +109,7 @@ AlterEventEnrollment-Response/currentState/state ABBREV=alterEventEnrollment- if(len == 4) { milliseconds = tvb_get_ntohl(tvb, offset); - ptime = signed_time_msecs_to_str(wmem_packet_scope(), milliseconds); + ptime = signed_time_msecs_to_str(actx->pinfo->pool, milliseconds); if(hf_index >= 0) { @@ -129,7 +129,7 @@ AlterEventEnrollment-Response/currentState/state ABBREV=alterEventEnrollment- ts.secs = (days + 5113) * 86400 + milliseconds / 1000; ts.nsecs = (milliseconds %% 1000) * 1000000U; - ptime = abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, TRUE); + ptime = abs_time_to_str(actx->pinfo->pool, &ts, ABSOLUTE_TIME_UTC, TRUE); if(hf_index >= 0) { proto_tree_add_string(tree, hf_index, tvb, offset, len, ptime); @@ -176,7 +176,7 @@ AlterEventEnrollment-Response/currentState/state ABBREV=alterEventEnrollment- ts.secs = seconds; ts.nsecs = nanoseconds; - ptime = abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, TRUE); + ptime = abs_time_to_str(actx->pinfo->pool, &ts, ABSOLUTE_TIME_UTC, TRUE); if(hf_index >= 0) { diff --git a/epan/dissectors/asn1/mms/packet-mms-template.c b/epan/dissectors/asn1/mms/packet-mms-template.c index 54d61d3027..d5d004d700 100644 --- a/epan/dissectors/asn1/mms/packet-mms-template.c +++ b/epan/dissectors/asn1/mms/packet-mms-template.c @@ -99,7 +99,7 @@ private_data_add_moreCinfo_id(asn1_ctx_t *actx, tvbuff_t *tvb) { mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx); (void) g_strlcat(private_data->moreCinfo, " ", BUFFER_SIZE_MORE); - (void) g_strlcat(private_data->moreCinfo, tvb_get_string_enc(wmem_packet_scope(), + (void) g_strlcat(private_data->moreCinfo, tvb_get_string_enc(actx->pinfo->pool, tvb, 2, tvb_get_guint8(tvb, 1), ENC_STRING), BUFFER_SIZE_MORE); } diff --git a/epan/dissectors/asn1/ulp/packet-ulp-template.c b/epan/dissectors/asn1/ulp/packet-ulp-template.c index b649ecbe10..8e0355ed1f 100644 --- a/epan/dissectors/asn1/ulp/packet-ulp-template.c +++ b/epan/dissectors/asn1/ulp/packet-ulp-template.c @@ -326,7 +326,7 @@ typedef struct static ulp_private_data_t* ulp_get_private_data(asn1_ctx_t *actx) { if (actx->private_data == NULL) { - actx->private_data = wmem_new0(wmem_packet_scope(), ulp_private_data_t); + actx->private_data = wmem_new0(actx->pinfo->pool, ulp_private_data_t); } return (ulp_private_data_t*)actx->private_data; } diff --git a/epan/dissectors/asn1/ulp/ulp.cnf b/epan/dissectors/asn1/ulp/ulp.cnf index 888f2e3ae8..b66cee1076 100644 --- a/epan/dissectors/asn1/ulp/ulp.cnf +++ b/epan/dissectors/asn1/ulp/ulp.cnf @@ -87,7 +87,7 @@ guint32 UlpMessage; default: actx->created_item = proto_tree_add_string(tree, hf_index, val_tvb, 0, tvb_reported_length(val_tvb), - tvb_bytes_to_str(wmem_packet_scope(), val_tvb, 0, + tvb_bytes_to_str(actx->pinfo->pool, val_tvb, 0, tvb_reported_length(val_tvb))); break; } @@ -119,7 +119,7 @@ Notification/requestorId TYPE=FT_STRING DISPLAY=STR_UNICODE default: actx->created_item = proto_tree_add_string(tree, hf_index, val_tvb, 0, tvb_reported_length(val_tvb), - tvb_bytes_to_str(wmem_packet_scope(), val_tvb, 0, + tvb_bytes_to_str(actx->pinfo->pool, val_tvb, 0, tvb_reported_length(val_tvb))); break; } diff --git a/epan/dissectors/asn1/z3950/packet-z3950-template.c b/epan/dissectors/asn1/z3950/packet-z3950-template.c index c1ecfdc53c..9359deb714 100644 --- a/epan/dissectors/asn1/z3950/packet-z3950-template.c +++ b/epan/dissectors/asn1/z3950/packet-z3950-template.c @@ -1303,7 +1303,7 @@ dissect_marc_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * marc_value_str = NULL; item = proto_tree_add_item_ret_string(leader_tree, hf_marc_leader_length, tvb, offset, 5, ENC_ASCII|ENC_NA, - wmem_packet_scope(),&marc_value_str); + pinfo->pool,&marc_value_str); offset += 5; if (marc_value_str) { @@ -1372,7 +1372,7 @@ dissect_marc_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * item = proto_tree_add_item_ret_string(leader_tree, hf_marc_leader_data_offset, tvb, offset, 5, ENC_ASCII|ENC_NA, - wmem_packet_scope(),&marc_value_str); + pinfo->pool,&marc_value_str); offset += 5; if (marc_value_str) { if (isdigit_string(marc_value_str)) { @@ -1449,7 +1449,7 @@ dissect_marc_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * + starting_character_position_size; directory_entry_count = ((data_offset - 1) - MARC_LEADER_LENGTH) / directory_entry_len; - marc_directory = (marc_directory_entry *)wmem_alloc0(wmem_packet_scope(), + marc_directory = (marc_directory_entry *)wmem_alloc0(pinfo->pool, directory_entry_count * sizeof(marc_directory_entry)); directory_item = proto_tree_add_item(marc_tree, hf_marc_directory, @@ -1473,7 +1473,7 @@ dissect_marc_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * marc_value_str = NULL; item = proto_tree_add_item_ret_string(directory_entry_tree, hf_marc_directory_entry_tag, tvb, offset, 3, ENC_ASCII, - wmem_packet_scope(), &marc_value_str); + pinfo->pool, &marc_value_str); offset += 3; if (marc_value_str) { if (isdigit_string(marc_value_str)) { @@ -1490,7 +1490,7 @@ dissect_marc_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * length_item = proto_tree_add_item_ret_string(directory_entry_tree, hf_marc_directory_entry_length, tvb, offset, length_of_field_size, ENC_ASCII, - wmem_packet_scope(), &marc_value_str); + pinfo->pool, &marc_value_str); offset += length_of_field_size; if (marc_value_str) { if (isdigit_string(marc_value_str)) { @@ -1506,7 +1506,7 @@ dissect_marc_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * marc_value_str = NULL; item = proto_tree_add_item_ret_string(directory_entry_tree, hf_marc_directory_entry_starting_position, tvb, offset, starting_character_position_size, ENC_ASCII, - wmem_packet_scope(), &marc_value_str); + pinfo->pool, &marc_value_str); offset += starting_character_position_size; if (marc_value_str) { if (isdigit_string(marc_value_str)) { diff --git a/epan/dissectors/asn1/z3950/z3950.cnf b/epan/dissectors/asn1/z3950/z3950.cnf index cbe348f986..d735affd99 100644 --- a/epan/dissectors/asn1/z3950/z3950.cnf +++ b/epan/dissectors/asn1/z3950/z3950.cnf @@ -154,12 +154,12 @@ OCLC-UserInformation B "1.2.840.10003.10.1000.17.1" "OCLC-UserInfo-1" #.FN_PARS AttributeSetId VAL_PTR=&oid_tvb #.FN_FTR AttributeSetId if (oid_tvb) { + packet_info *pinfo = actx->pinfo; guint len = tvb_reported_length_remaining(oid_tvb, 0); - gchar *oid_str = oid_encoded2string(wmem_packet_scope(), + gchar *oid_str = oid_encoded2string(pinfo->pool, tvb_get_ptr(oid_tvb, 0, len), len); gint attribute_set_idx = Z3950_ATSET_UNKNOWN; z3950_atinfo_t *atinfo_data; - packet_info *pinfo = actx->pinfo; if (g_strcmp0(oid_str, Z3950_ATSET_BIB1_OID) == 0) { attribute_set_idx = Z3950_ATSET_BIB1; @@ -230,12 +230,12 @@ OCLC-UserInformation B "1.2.840.10003.10.1000.17.1" "OCLC-UserInfo-1" #.FN_PARS DefaultDiagFormat/diagnosticSetId VAL_PTR=&oid_tvb #.FN_FTR DefaultDiagFormat/diagnosticSetId if (oid_tvb) { + packet_info *pinfo = actx->pinfo; guint len = tvb_reported_length_remaining(oid_tvb, 0); - gchar *oid_str = oid_encoded2string(wmem_packet_scope(), + gchar *oid_str = oid_encoded2string(pinfo->pool, tvb_get_ptr(oid_tvb, 0, len), len); gint diagset_idx = Z3950_DIAGSET_UNKNOWN; z3950_diaginfo_t *diaginfo_data; - packet_info *pinfo = actx->pinfo; if (g_strcmp0(oid_str, Z3950_DIAGSET_BIB1_OID) == 0) { diagset_idx = Z3950_DIAGSET_BIB1; |