diff options
39 files changed, 237 insertions, 219 deletions
diff --git a/asn1/acse/acse.cnf b/asn1/acse/acse.cnf index 4fe7f342ea..8d503f0398 100644 --- a/asn1/acse/acse.cnf +++ b/asn1/acse/acse.cnf @@ -75,7 +75,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) { - object_identifier_id = ep_strdup(oid); + object_identifier_id = wmem_strdup(wmem_packet_scope(), oid); } if(session) diff --git a/asn1/ansi_map/packet-ansi_map-template.c b/asn1/ansi_map/packet-ansi_map-template.c index 931fb5592b..4c2258cb0c 100644 --- a/asn1/ansi_map/packet-ansi_map-template.c +++ b/asn1/ansi_map/packet-ansi_map-template.c @@ -91,6 +91,7 @@ #include <epan/prefs.h> #include <epan/tap.h> #include <epan/asn1.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-ansi_map.h" @@ -420,13 +421,13 @@ update_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb /* 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 = ep_strdup(p_private_tcap->TransactionID_str); + buf = wmem_strdup(wmem_packet_scope(), p_private_tcap->TransactionID_str); break; case 1: - buf = ep_strdup_printf("%s%s",p_private_tcap->TransactionID_str,src_str); + buf = wmem_strdup_printf(wmem_packet_scope(), "%s%s",p_private_tcap->TransactionID_str,src_str); break; default: - buf = ep_strdup_printf("%s%s%s",p_private_tcap->TransactionID_str,src_str,dst_str); + buf = wmem_strdup_printf(wmem_packet_scope(), "%s%s%s",p_private_tcap->TransactionID_str,src_str,dst_str); break; } /* If the entry allready exists don't owervrite it */ @@ -4290,7 +4291,7 @@ find_saved_invokedata(asn1_ctx_t *actx){ guint8 *dst_str; char *buf; - buf=(char *)ep_alloc(1024); + buf=(char *)wmem_alloc(wmem_packet_scope(), 1024); /* Data from the TCAP dissector */ if (actx->pinfo->private_data != NULL){ diff --git a/asn1/dop/packet-dop-template.c b/asn1/dop/packet-dop-template.c index 41a3d462f9..8995f4fede 100644 --- a/asn1/dop/packet-dop-template.c +++ b/asn1/dop/packet-dop-template.c @@ -31,6 +31,7 @@ #include <epan/oids.h> #include <epan/asn1.h> #include <epan/expert.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-acse.h" @@ -89,7 +90,7 @@ call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet { char* binding_param; - binding_param = ep_strdup_printf("%s.%s", base_string, binding_type ? binding_type : ""); + binding_param = wmem_strdup_printf(wmem_packet_scope(), "%s.%s", base_string, binding_type ? binding_type : ""); col_append_fstr(pinfo->cinfo, COL_INFO, " %s", col_info); diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf index 5e2420a00b..8b8386ea09 100644 --- a/asn1/h225/h225.cnf +++ b/asn1/h225/h225.cnf @@ -544,7 +544,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber %(ACTX)s->value_ptr = &guid_tvb; %(DEFAULT_BODY)s if (guid_tvb) - tvb_get_ntohguid(guid_tvb, 0, call_id_guid = ep_new(e_guid_t)); + tvb_get_ntohguid(guid_tvb, 0, call_id_guid = wmem_new(wmem_packet_scope(), e_guid_t)); %(ACTX)s->value_ptr = NULL; #.END #---------------------------------------------------------------------------------------- @@ -684,7 +684,7 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); - if (gefx) gefx->id = ep_strdup_printf("%%u", value_int); + if (gefx) gefx->id = wmem_strdup_printf(wmem_packet_scope(), "%%u", value_int); #.END #.FN_BODY GenericIdentifier/oid FN_VARIANT = _str VAL_PTR = &oid_str diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c index 7fa03070a0..1671118341 100644 --- a/asn1/h225/packet-h225-template.c +++ b/asn1/h225/packet-h225-template.c @@ -37,6 +37,7 @@ #include <glib.h> #include <epan/packet.h> #include <epan/conversation.h> +#include <epan/wmem/wmem.h> #include <string.h> diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf index a9c5df2dbf..f5de35e079 100644 --- a/asn1/h245/h245.cnf +++ b/asn1/h245/h245.cnf @@ -222,7 +222,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format const gchar *olc_key; olc_info_t *olc_req; - upcoming_olc = (!actx->pinfo->fd->flags.visited) ? ep_new0(olc_info_t) : NULL; + upcoming_olc = (!actx->pinfo->fd->flags.visited) ? wmem_new0(wmem_packet_scope(), olc_info_t) : NULL; h223_fw_lc_num = 0; h223_rev_lc_num = 0; @@ -632,7 +632,7 @@ if (h245_pi != NULL) %(DEFAULT_BODY)s if (gefx) { - gefx->subid = ep_strdup_printf("%%u", subMessageIdentifer); + gefx->subid = wmem_strdup_printf(wmem_packet_scope(), "%%u", subMessageIdentifer); gef_ctx_update_key(gef_ctx_get(actx->private_data)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG CapabilityIdentifier: %%s", gef_ctx_get(actx->private_data)->key);*/ } @@ -763,7 +763,7 @@ if (h245_pi != NULL) %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); - if (gefx) gefx->id = ep_strdup_printf("%%d", value_int); + if (gefx) gefx->id = wmem_strdup_printf(wmem_packet_scope(), "%%d", value_int); #.END #---------------------------------------------------------------------------------------- #.FN_BODY ParameterValue/booleanArray VAL_PTR = &value @@ -775,7 +775,7 @@ if (h245_pi != NULL) %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = ep_new(guint8); + buf = wmem_new(wmem_packet_scope(), guint8); buf[0] = value; value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint8), sizeof(guint8)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/ @@ -792,7 +792,7 @@ if (h245_pi != NULL) %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)ep_new(guint16); + buf = (guint8 *)wmem_new(wmem_packet_scope(), guint16); phtons(buf, value); value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint16), sizeof(guint16)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/ @@ -809,7 +809,7 @@ if (h245_pi != NULL) %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)ep_new(guint16); + buf = (guint8 *)wmem_new(wmem_packet_scope(), guint16); phtons(buf, value); value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint16), sizeof(guint16)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/ @@ -826,7 +826,7 @@ if (h245_pi != NULL) %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)ep_new(guint32); + buf = (guint8 *)wmem_new(wmem_packet_scope(), guint32); phtonl(buf, value); value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint32), sizeof(guint32)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/ @@ -843,7 +843,7 @@ if (h245_pi != NULL) %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)ep_new(guint32); + buf = (guint8 *)wmem_new(wmem_packet_scope(), guint32); phtonl(buf, value); value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint32), sizeof(guint32)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/ diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf index a87b1afa9f..227425a7a5 100644 --- a/asn1/h248/h248.cnf +++ b/asn1/h248/h248.cnf @@ -312,7 +312,7 @@ AuditReplyV1/auditResult audit_result #.END #.FN_HDR TerminationID - curr_info.term = ep_new0(gcp_term_t); + curr_info.term = wmem_new0(wmem_packet_scope(), gcp_term_t); wild_term = GCP_WILDCARD_NONE; #.END @@ -352,8 +352,8 @@ AuditReplyV1/auditResult audit_result } } else { curr_info.term->len = 0; - curr_info.term->buffer = (guint8*)ep_strdup(""); - curr_info.term->str = ep_strdup("?"); + curr_info.term->buffer = (guint8*)wmem_strdup(wmem_packet_scope(), ""); + curr_info.term->str = wmem_strdup(wmem_packet_scope(), "?"); } #.END diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c index 8b14fcf9f7..b0ceb0fe27 100644 --- a/asn1/h248/packet-h248-template.c +++ b/asn1/h248/packet-h248-template.c @@ -777,9 +777,9 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi pi = proto_tree_add_uint(package_tree, hf_248_pkg_param, tvb, offset-2, 2, name_minor); if (pkg->signal_names && ( strval = try_val_to_str(name_minor, pkg->signal_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,name_minor); } else { - strval = ep_strdup_printf("Unknown (%d)",name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",name_minor); } proto_item_set_text(pi,"Signal ID: %s", strval); @@ -1034,9 +1034,9 @@ static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offse const gchar* strval; if (pkg->param_names && ( strval = try_val_to_str(name_minor, pkg->param_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,name_minor); } else { - strval = ep_strdup_printf("Unknown (%d)",name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",name_minor); } proto_item_set_text(pi,"Parameter: %s", strval); @@ -1097,9 +1097,9 @@ static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offs const gchar* strval; if (pkg->event_names && ( strval = try_val_to_str(name_minor, pkg->event_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,name_minor); } else { - strval = ep_strdup_printf("Unknown (%d)",name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",name_minor); } proto_item_set_text(pi,"Event ID: %s", strval); @@ -1162,9 +1162,9 @@ static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int of const gchar* strval; if (pkg->signal_names && ( strval = try_val_to_str(name_minor, pkg->signal_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,name_minor); } else { - strval = ep_strdup_printf("Unknown (%d)",name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",name_minor); } proto_item_set_text(pi,"Signal ID: %s", strval); @@ -1255,9 +1255,9 @@ static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tv } if (curr_info.sig && curr_info.sig->param_names && ( strval = try_val_to_str(param_id, curr_info.sig->param_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,param_id); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,param_id); } else { - strval = ep_strdup_printf("Unknown (%d)",param_id); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",param_id); } proto_item_set_text(pi,"Parameter: %s", strval); @@ -1332,9 +1332,9 @@ static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t * } if (curr_info.evt && curr_info.evt->param_names && ( strval = try_val_to_str(param_id, curr_info.evt->param_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,param_id); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,param_id); } else { - strval = ep_strdup_printf("Unknown (%d)",param_id); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",param_id); } proto_item_set_text(pi,"Parameter: %s", strval); diff --git a/asn1/h323/packet-h323-template.c b/asn1/h323/packet-h323-template.c index cece8c4901..2dbfef2a1a 100644 --- a/asn1/h323/packet-h323-template.c +++ b/asn1/h323/packet-h323-template.c @@ -29,6 +29,7 @@ #include <epan/packet.h> #include <epan/oids.h> #include <epan/asn1.h> +#include <epan/wmem/wmem.h> #include "packet-per.h" #include "packet-h225.h" @@ -43,7 +44,7 @@ gef_ctx_t* gef_ctx_alloc(gef_ctx_t *parent, const gchar *type) { gef_ctx_t *gefx; - gefx = ep_new0(gef_ctx_t); + gefx = wmem_new0(wmem_packet_scope(), gef_ctx_t); gefx->signature = GEF_CTX_SIGNATURE; gefx->parent = parent; gefx->type = type; @@ -75,7 +76,7 @@ void gef_ctx_update_key(gef_ctx_t *gefx) { if (!gefx) return; parent_key = (gefx->parent) ? gefx->parent->key : NULL; - gefx->key = ep_strdup_printf( + gefx->key = wmem_strdup_printf(wmem_packet_scope(), "%s%s" /* parent prefix */ "%s%s%s" /* type, id */ "%s%s" /* subid */, diff --git a/asn1/h450-ros/packet-h450-ros-template.c b/asn1/h450-ros/packet-h450-ros-template.c index 1443fad7ee..50064acfd5 100644 --- a/asn1/h450-ros/packet-h450-ros-template.c +++ b/asn1/h450-ros/packet-h450-ros-template.c @@ -29,6 +29,7 @@ #include <epan/strutil.h> #include <epan/asn1.h> #include <epan/expert.h> +#include <epan/wmem/wmem.h> #include "packet-per.h" diff --git a/asn1/kerberos/kerberos.cnf b/asn1/kerberos/kerberos.cnf index ccbd847811..b63c864b83 100644 --- a/asn1/kerberos/kerberos.cnf +++ b/asn1/kerberos/kerberos.cnf @@ -112,7 +112,7 @@ guint32 msgtype; #.FN_BODY PADATA-TYPE - actx->value_ptr = ep_alloc(sizeof(guint32)); + actx->value_ptr = wmem_alloc(wmem_packet_scope(), sizeof(guint32)); offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, (guint32*)actx->value_ptr); @@ -187,7 +187,7 @@ guint32 msgtype; addr_type = *((guint32*)actx->value_ptr); } - address_str=(char*)ep_alloc(ADDRESS_STR_BUFSIZ); + address_str=(char*)wmem_alloc(wmem_packet_scope(), ADDRESS_STR_BUFSIZ); address_str[0]=0; switch(addr_type){ case KRB5_ADDR_IPv4: @@ -228,7 +228,7 @@ guint32 msgtype; #xxx TYPE = FT_UINT16 DISPLAY = BASE_DEC STRINGS = VALS(xx_vals) #.FN_BODY ENCTYPE - actx->value_ptr = ep_alloc(sizeof(guint32)); + actx->value_ptr = wmem_alloc(wmem_packet_scope(), sizeof(guint32)); offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, (guint32*)actx->value_ptr); @@ -291,7 +291,7 @@ guint32 msgtype; #.FN_BODY CKSUMTYPE - actx->value_ptr = ep_alloc(sizeof(guint32)); + actx->value_ptr = wmem_alloc(wmem_packet_scope(), sizeof(guint32)); offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, (guint32*)actx->value_ptr); @@ -315,7 +315,7 @@ guint32 msgtype; return offset; #.FN_BODY EncryptionKey/keytype - kerberos_key_t* key = (kerberos_key_t*)ep_alloc(sizeof(kerberos_key_t)); + kerberos_key_t* key = (kerberos_key_t*)wmem_alloc(wmem_packet_scope(), sizeof(kerberos_key_t)); actx->value_ptr = key; offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, @@ -344,7 +344,7 @@ guint32 msgtype; } #.FN_BODY AuthorizationData/_item/ad-type - actx->value_ptr = ep_alloc(sizeof(guint32)); + actx->value_ptr = wmem_alloc(wmem_packet_scope(), sizeof(guint32)); offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, (guint32*)actx->value_ptr); @@ -365,7 +365,7 @@ guint32 msgtype; } #.FN_BODY HostAddress/addr-type - actx->value_ptr = ep_alloc(sizeof(guint32)); + actx->value_ptr = wmem_alloc(wmem_packet_scope(), sizeof(guint32)); offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, (guint32*)actx->value_ptr); diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf index 6394a73ba2..6235b8e513 100644 --- a/asn1/ldap/ldap.cnf +++ b/asn1/ldap/ldap.cnf @@ -387,7 +387,7 @@ ldap_conv_info_t *ldap_info; Filter_string=ldapstring; } else if (hf_index == hf_ldap_type) { /* remember attribute type name */ - attr_type = ep_strdup(ldapstring); + attr_type = wmem_strdup(wmem_packet_scope(), ldapstring); /* append it to the parent entry */ proto_item_append_text(tree, " %%s", attr_type); @@ -536,31 +536,31 @@ ldap_conv_info_t *ldap_info; Filter_length = 0; #.FN_FTR Filter/equalityMatch - Filter_string=ep_strdup_printf("(%s=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); #.FN_FTR Filter/greaterOrEqual - Filter_string=ep_strdup_printf("(%s>=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s>=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); #.FN_FTR Filter/lessOrEqual - Filter_string=ep_strdup_printf("(%s<=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s<=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); #.FN_FTR Filter/approxMatch - Filter_string=ep_strdup_printf("(%s~=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s~=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); #.FN_FTR Filter/and/_item if(and_filter_string){ - and_filter_string=ep_strdup_printf("(&%s%s)",and_filter_string,Filter_string); + and_filter_string=wmem_strdup_printf(wmem_packet_scope(), "(&%s%s)",and_filter_string,Filter_string); } else { and_filter_string=Filter_string; } @@ -581,13 +581,13 @@ ldap_conv_info_t *ldap_info; if(and_filter_string) { proto_item_append_text(it, "%%s", and_filter_string); - Filter_string=ep_strdup_printf("%%s",and_filter_string); + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "%%s",and_filter_string); } and_filter_string=old_and_filter_string; #.FN_FTR Filter/or/_item if(or_filter_string){ - or_filter_string=ep_strdup_printf("(|%s%s)",or_filter_string,Filter_string); + or_filter_string=wmem_strdup_printf(wmem_packet_scope(), "(|%s%s)",or_filter_string,Filter_string); } else { or_filter_string=Filter_string; } @@ -607,15 +607,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=ep_strdup_printf("%%s",or_filter_string); + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "%%s",or_filter_string); } or_filter_string=old_or_filter_string; #.FN_FTR Filter/present - Filter_string=ep_strdup_printf("(%s=*)",string_or_null(Filter_string)); + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s=*)",string_or_null(Filter_string)); #.FN_FTR Filter/not - Filter_string=ep_strdup_printf("(!%s)",string_or_null(Filter_string)); + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(!%s)",string_or_null(Filter_string)); #.FN_BODY MatchingRuleAssertion/dnAttributes gboolean val; @@ -633,7 +633,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v matching_rule_dnattr=FALSE; #.FN_FTR Filter/extensibleMatch - Filter_string=ep_strdup_printf("(%s:%s%s%s=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s:%s%s%s=%s)", (attr_type?attr_type:""), (matching_rule_dnattr?"dn:":""), (matching_rule_string?matching_rule_string:""), @@ -642,15 +642,15 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v #.FN_FTR SubstringFilter/substrings/_item if (substring_item_final) { - substring_value=ep_strdup_printf("%s%s", + substring_value=wmem_strdup_printf(wmem_packet_scope(), "%s%s", (substring_value?substring_value:"*"), substring_item_final); } else if (substring_item_any) { - substring_value=ep_strdup_printf("%s%s*", + substring_value=wmem_strdup_printf(wmem_packet_scope(), "%s%s*", (substring_value?substring_value:"*"), substring_item_any); } else if (substring_item_init) { - substring_value=ep_strdup_printf("%s*", + substring_value=wmem_strdup_printf(wmem_packet_scope(), "%s*", substring_item_init); } @@ -670,7 +670,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v tree = tr; } %(DEFAULT_BODY)s - Filter_string=ep_strdup_printf("(%%s=%%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%%s=%%s)", string_or_null(attr_type), string_or_null(substring_value)); proto_item_append_text(it, "%%s", Filter_string); diff --git a/asn1/p1/p1.cnf b/asn1/p1/p1.cnf index 1c6b44a91e..7d8f4c3f34 100644 --- a/asn1/p1/p1.cnf +++ b/asn1/p1/p1.cnf @@ -640,10 +640,10 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" /* convert integer content type to oid for dispatch when the content is found */ switch(ict) { case 2: - content_type_id = ep_strdup("2.6.1.10.0"); + content_type_id = wmem_strdup(wmem_packet_scope(), "2.6.1.10.0"); break; case 22: - content_type_id = ep_strdup("2.6.1.10.1"); + content_type_id = wmem_strdup(wmem_packet_scope(), "2.6.1.10.1"); break; default: content_type_id = NULL; @@ -938,7 +938,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" #.FN_BODY TeletexDomainDefinedAttribute - ddatype = (char *)ep_alloc(MAX_ORA_STR_LEN); ddatype[0] = '\0'; + ddatype = (char *)wmem_alloc(wmem_packet_scope(), MAX_ORA_STR_LEN); ddatype[0] = '\0'; %(DEFAULT_BODY)s @@ -1047,13 +1047,13 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" } #.FN_BODY BuiltInDomainDefinedAttribute - ddatype = (char *)ep_alloc(MAX_ORA_STR_LEN); ddatype[0] = '\0'; + ddatype = (char *)wmem_alloc(wmem_packet_scope(), MAX_ORA_STR_LEN); ddatype[0] = '\0'; %(DEFAULT_BODY)s #.FN_BODY ORAddress - oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; + oraddress = (char *)wmem_alloc(wmem_packet_scope(), MAX_ORA_STR_LEN); oraddress[0] = '\0'; doing_address = TRUE; address_item = NULL; @@ -1066,7 +1066,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" #.FN_BODY ORName - oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; + oraddress = (char *)wmem_alloc(wmem_packet_scope(), MAX_ORA_STR_LEN); oraddress[0] = '\0'; address_item = NULL; doing_address = TRUE; @@ -1085,7 +1085,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" #.FN_BODY GlobalDomainIdentifier - oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; + oraddress = (char *)wmem_alloc(wmem_packet_scope(), MAX_ORA_STR_LEN); oraddress[0] = '\0'; address_item = tree; %(DEFAULT_BODY)s diff --git a/asn1/p1/packet-p1-template.c b/asn1/p1/packet-p1-template.c index cb6cb2a8c8..0c47d17b8a 100644 --- a/asn1/p1/packet-p1-template.c +++ b/asn1/p1/packet-p1-template.c @@ -31,6 +31,7 @@ #include <epan/oids.h> #include <epan/asn1.h> #include <epan/expert.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-acse.h" diff --git a/asn1/pkcs1/packet-pkcs1-template.c b/asn1/pkcs1/packet-pkcs1-template.c index 4ad0ae0f0a..5d0b2764db 100644 --- a/asn1/pkcs1/packet-pkcs1-template.c +++ b/asn1/pkcs1/packet-pkcs1-template.c @@ -29,6 +29,7 @@ #include <epan/packet.h> #include <epan/oids.h> #include <epan/asn1.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-pkcs1.h" diff --git a/asn1/pkcs12/packet-pkcs12-template.c b/asn1/pkcs12/packet-pkcs12-template.c index 0160213248..b43323b669 100644 --- a/asn1/pkcs12/packet-pkcs12-template.c +++ b/asn1/pkcs12/packet-pkcs12-template.c @@ -271,14 +271,14 @@ int PBE_decrypt_data(const char *object_identifier_id_param, tvbuff_t *encrypted } /* allocate buffers */ - key = (char *)ep_alloc(keylen); + key = (char *)wmem_alloc(wmem_packet_scope(), keylen); if(!generate_key_or_iv(1 /*LEY */, salt, iteration_count, password, keylen, key)) return FALSE; if(ivlen) { - iv = (char *)ep_alloc(ivlen); + iv = (char *)wmem_alloc(wmem_packet_scope(), ivlen); if(!generate_key_or_iv(2 /* IV */, salt, iteration_count, password, ivlen, iv)) return FALSE; diff --git a/asn1/q932-ros/packet-q932-ros-template.c b/asn1/q932-ros/packet-q932-ros-template.c index af6705cb29..071c34b5ae 100644 --- a/asn1/q932-ros/packet-q932-ros-template.c +++ b/asn1/q932-ros/packet-q932-ros-template.c @@ -29,6 +29,7 @@ #include <epan/strutil.h> #include <epan/asn1.h> #include <epan/expert.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" diff --git a/asn1/rnsap/rnsap.cnf b/asn1/rnsap/rnsap.cnf index c5116fc7b7..5af64d19c4 100644 --- a/asn1/rnsap/rnsap.cnf +++ b/asn1/rnsap/rnsap.cnf @@ -89,7 +89,7 @@ ProtocolIE-ContainerPairList #.END #.FN_FTR ProcedureID - ProcedureID = ep_strdup_printf("%s/%s", + ProcedureID = wmem_strdup_printf(wmem_packet_scope(), "%s/%s", val_to_str_ext(ProcedureCode, &rnsap_ProcedureCode_vals_ext, "unknown(%u)"), val_to_str(ddMode, rnsap_DdMode_vals, "unknown(%u)")); #.END diff --git a/asn1/ros/ros-err.cnf b/asn1/ros/ros-err.cnf index 5ec7e0e319..a301db2ebd 100644 --- a/asn1/ros/ros-err.cnf +++ b/asn1/ros/ros-err.cnf @@ -22,11 +22,11 @@ if (!err_handle || !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle)))) { if (actx->rose_ctx->d.code == 0) - descr = ep_strdup_printf("ERR: %d", actx->rose_ctx->d.code_local); + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %d", actx->rose_ctx->d.code_local); else if (actx->rose_ctx->d.code == 1) - descr = ep_strdup_printf("ERR: %s", actx->rose_ctx->d.code_global); + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %s", actx->rose_ctx->d.code_global); } else { - descr = ep_strdup_printf("ERR:"); + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR:"); } if (actx->rose_ctx->apdu_depth >= 0) diff --git a/asn1/ros/ros-inv.cnf b/asn1/ros/ros-inv.cnf index 0e7ba0390b..a26a917f96 100644 --- a/asn1/ros/ros-inv.cnf +++ b/asn1/ros/ros-inv.cnf @@ -23,11 +23,11 @@ if (!arg_handle || !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle)))) { if (actx->rose_ctx->d.code == 0) - descr = ep_strdup_printf("INV: %d", actx->rose_ctx->d.code_local); + descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %d", actx->rose_ctx->d.code_local); else if (actx->rose_ctx->d.code == 1) - descr = ep_strdup_printf("INV: %s", actx->rose_ctx->d.code_global); + descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %s", actx->rose_ctx->d.code_global); } else { - descr = ep_strdup_printf("INV:"); + descr = wmem_strdup_printf(wmem_packet_scope(), "INV:"); } if (actx->rose_ctx->apdu_depth >= 0) diff --git a/asn1/ros/ros-rej.cnf b/asn1/ros/ros-rej.cnf index 02b97f582f..96e114b452 100644 --- a/asn1/ros/ros-rej.cnf +++ b/asn1/ros/ros-rej.cnf @@ -8,7 +8,7 @@ problem_str[0] = '\0'; #.FN_FTR Reject - descr = ep_strdup_printf("REJ: %s", problem_str); + descr = wmem_strdup_printf(wmem_packet_scope(), "REJ: %s", problem_str); if (actx->rose_ctx->apdu_depth >= 0) proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); diff --git a/asn1/ros/ros-res.cnf b/asn1/ros/ros-res.cnf index d9ab23c421..21bde899b5 100644 --- a/asn1/ros/ros-res.cnf +++ b/asn1/ros/ros-res.cnf @@ -23,11 +23,11 @@ if (!res_handle || !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle)))) { if (actx->rose_ctx->d.code == 0) - descr = ep_strdup_printf("RES: %d", actx->rose_ctx->d.code_local); + descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %d", actx->rose_ctx->d.code_local); else if (actx->rose_ctx->d.code == 1) - descr = ep_strdup_printf("RES: %s", actx->rose_ctx->d.code_global); + descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %s", actx->rose_ctx->d.code_global); } else { - descr = ep_strdup_printf("RES:"); + descr = wmem_strdup_printf(wmem_packet_scope(), "RES:"); } if (actx->rose_ctx->apdu_depth >= 0) diff --git a/asn1/x509if/packet-x509if-template.c b/asn1/x509if/packet-x509if-template.c index c88da2d820..47563d90f8 100644 --- a/asn1/x509if/packet-x509if-template.c +++ b/asn1/x509if/packet-x509if-template.c @@ -29,6 +29,7 @@ #include <epan/packet.h> #include <epan/oids.h> #include <epan/asn1.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-dap.h" diff --git a/asn1/x509if/x509if.cnf b/asn1/x509if/x509if.cnf index b9c7b9e5d9..b730e2a2e5 100644 --- a/asn1/x509if/x509if.cnf +++ b/asn1/x509if/x509if.cnf @@ -212,7 +212,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" if((fmt = val_to_str(hf_index, fmt_vals, "")) && *fmt) { /* we have a format */ - last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; + last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); *last_ava = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); g_snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s", name, fmt); @@ -257,7 +257,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" /* we have a format */ if (!last_ava) { - last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); + last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); } if(!(name = oid_resolved_from_string(object_identifier_id))) @@ -334,7 +334,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" rdn_one_value = FALSE; top_of_rdn = tree; - last_rdn = (char *)ep_alloc(MAX_DN_STR_LEN); *last_rdn = '\0'; + last_rdn = (char *)wmem_alloc(wmem_packet_scope(), MAX_DN_STR_LEN); *last_rdn = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); %(DEFAULT_BODY)s @@ -345,7 +345,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" /* now append this to the DN */ if (last_dn) { if(*last_dn) { - temp_dn = (char *)ep_alloc(MAX_DN_STR_LEN); /* is there a better way to use ep_alloc here ? */ + temp_dn = (char *)wmem_alloc(wmem_packet_scope(), MAX_DN_STR_LEN); /* is there a better way to use ep_alloc here ? */ g_snprintf(temp_dn, MAX_DN_STR_LEN, "%%s,%%s", last_rdn, last_dn); last_dn[0] = '\0'; g_strlcat(last_dn, temp_dn, MAX_DN_STR_LEN); @@ -375,7 +375,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" const char *fmt; dn_one_rdn = FALSE; /* reset */ - last_dn = (char *)ep_alloc(MAX_DN_STR_LEN); *last_dn = '\0'; + last_dn = (char *)wmem_alloc(wmem_packet_scope(), MAX_DN_STR_LEN); *last_dn = '\0'; top_of_dn = NULL; register_frame_end_routine (actx->pinfo, x509if_frame_end); @@ -406,7 +406,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" #.FN_BODY AttributeValueAssertion ava_hf_index = hf_index; - last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; + last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); *last_ava = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); %(DEFAULT_BODY)s diff --git a/epan/dissectors/packet-acse.c b/epan/dissectors/packet-acse.c index f101c6a1fa..031dda81f7 100644 --- a/epan/dissectors/packet-acse.c +++ b/epan/dissectors/packet-acse.c @@ -335,7 +335,7 @@ dissect_acse_T_indirect_reference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, /* look up the indirect reference */ if((oid = find_oid_by_pres_ctx_id(actx->pinfo, indir_ref)) != NULL) { - object_identifier_id = ep_strdup(oid); + object_identifier_id = wmem_strdup(wmem_packet_scope(), oid); } if(session) diff --git a/epan/dissectors/packet-ansi_map.c b/epan/dissectors/packet-ansi_map.c index dcad43094f..84b0449108 100644 --- a/epan/dissectors/packet-ansi_map.c +++ b/epan/dissectors/packet-ansi_map.c @@ -99,6 +99,7 @@ #include <epan/prefs.h> #include <epan/tap.h> #include <epan/asn1.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-ansi_map.h" @@ -881,7 +882,7 @@ static int hf_ansi_map_interSystemSMSDeliveryPointToPointRes = -1; /* InterSyst static int hf_ansi_map_qualificationRequest2Res = -1; /* QualificationRequest2Res */ /*--- End of included file: packet-ansi_map-hf.c ---*/ -#line 325 "../../asn1/ansi_map/packet-ansi_map-template.c" +#line 326 "../../asn1/ansi_map/packet-ansi_map-template.c" /* Initialize the subtree pointers */ static gint ett_ansi_map = -1; @@ -1141,7 +1142,7 @@ static gint ett_ansi_map_InvokeData = -1; static gint ett_ansi_map_ReturnData = -1; /*--- End of included file: packet-ansi_map-ett.c ---*/ -#line 357 "../../asn1/ansi_map/packet-ansi_map-template.c" +#line 358 "../../asn1/ansi_map/packet-ansi_map-template.c" /* Global variables */ static dissector_table_t is637_tele_id_dissector_table; /* IS-637 Teleservice ID */ @@ -1208,13 +1209,13 @@ update_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb /* 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 = ep_strdup(p_private_tcap->TransactionID_str); + buf = wmem_strdup(wmem_packet_scope(), p_private_tcap->TransactionID_str); break; case 1: - buf = ep_strdup_printf("%s%s",p_private_tcap->TransactionID_str,src_str); + buf = wmem_strdup_printf(wmem_packet_scope(), "%s%s",p_private_tcap->TransactionID_str,src_str); break; default: - buf = ep_strdup_printf("%s%s%s",p_private_tcap->TransactionID_str,src_str,dst_str); + buf = wmem_strdup_printf(wmem_packet_scope(), "%s%s%s",p_private_tcap->TransactionID_str,src_str,dst_str); break; } /* If the entry allready exists don't owervrite it */ @@ -15462,7 +15463,7 @@ dissect_ansi_map_ReturnData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of /*--- End of included file: packet-ansi_map-fn.c ---*/ -#line 3588 "../../asn1/ansi_map/packet-ansi_map-template.c" +#line 3589 "../../asn1/ansi_map/packet-ansi_map-template.c" /* * 6.5.2.dk N.S0013-0 v 1.0,X.S0004-550-E v1.0 2.301 @@ -16168,7 +16169,7 @@ find_saved_invokedata(asn1_ctx_t *actx){ guint8 *dst_str; char *buf; - buf=(char *)ep_alloc(1024); + buf=(char *)wmem_alloc(wmem_packet_scope(), 1024); /* Data from the TCAP dissector */ if (actx->pinfo->private_data != NULL){ @@ -19308,7 +19309,7 @@ void proto_register_ansi_map(void) { NULL, HFILL }}, /*--- End of included file: packet-ansi_map-hfarr.c ---*/ -#line 5241 "../../asn1/ansi_map/packet-ansi_map-template.c" +#line 5242 "../../asn1/ansi_map/packet-ansi_map-template.c" }; /* List of subtrees */ @@ -19569,7 +19570,7 @@ void proto_register_ansi_map(void) { &ett_ansi_map_ReturnData, /*--- End of included file: packet-ansi_map-ettarr.c ---*/ -#line 5274 "../../asn1/ansi_map/packet-ansi_map-template.c" +#line 5275 "../../asn1/ansi_map/packet-ansi_map-template.c" }; static const enum_val_t ansi_map_response_matching_type_values[] = { diff --git a/epan/dissectors/packet-dop.c b/epan/dissectors/packet-dop.c index f53814ed74..b4beb14a90 100644 --- a/epan/dissectors/packet-dop.c +++ b/epan/dissectors/packet-dop.c @@ -39,6 +39,7 @@ #include <epan/oids.h> #include <epan/asn1.h> #include <epan/expert.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-acse.h" @@ -266,7 +267,7 @@ static int hf_dop_GrantsAndDenials_grantInvoke = -1; static int hf_dop_GrantsAndDenials_denyInvoke = -1; /*--- End of included file: packet-dop-hf.c ---*/ -#line 66 "../../asn1/dop/packet-dop-template.c" +#line 67 "../../asn1/dop/packet-dop-template.c" /* Initialize the subtree pointers */ static gint ett_dop = -1; @@ -343,7 +344,7 @@ static gint ett_dop_T_basicLevels = -1; static gint ett_dop_GrantsAndDenials = -1; /*--- End of included file: packet-dop-ett.c ---*/ -#line 71 "../../asn1/dop/packet-dop-template.c" +#line 72 "../../asn1/dop/packet-dop-template.c" static expert_field ei_dop_unknown_binding_parameter = EI_INIT; @@ -2044,14 +2045,14 @@ static void dissect_ACIItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto /*--- End of included file: packet-dop-fn.c ---*/ -#line 86 "../../asn1/dop/packet-dop-template.c" +#line 87 "../../asn1/dop/packet-dop-template.c" static int call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, const char *col_info) { char* binding_param; - binding_param = ep_strdup_printf("%s.%s", base_string, binding_type ? binding_type : ""); + binding_param = wmem_strdup_printf(wmem_packet_scope(), "%s.%s", base_string, binding_type ? binding_type : ""); col_append_fstr(pinfo->cinfo, COL_INFO, " %s", col_info); @@ -2964,7 +2965,7 @@ void proto_register_dop(void) { NULL, HFILL }}, /*--- End of included file: packet-dop-hfarr.c ---*/ -#line 241 "../../asn1/dop/packet-dop-template.c" +#line 242 "../../asn1/dop/packet-dop-template.c" }; /* List of subtrees */ @@ -3043,7 +3044,7 @@ void proto_register_dop(void) { &ett_dop_GrantsAndDenials, /*--- End of included file: packet-dop-ettarr.c ---*/ -#line 248 "../../asn1/dop/packet-dop-template.c" +#line 249 "../../asn1/dop/packet-dop-template.c" }; static ei_register_info ei[] = { @@ -3106,7 +3107,7 @@ void proto_reg_handoff_dop(void) { /*--- End of included file: packet-dop-dis-tab.c ---*/ -#line 288 "../../asn1/dop/packet-dop-template.c" +#line 289 "../../asn1/dop/packet-dop-template.c" /* APPLICATION CONTEXT */ oid_add_from_string("id-ac-directory-operational-binding-management","2.5.3.3"); diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c index 896c4503b3..f7d705d0ed 100644 --- a/epan/dissectors/packet-h225.c +++ b/epan/dissectors/packet-h225.c @@ -45,6 +45,7 @@ #include <glib.h> #include <epan/packet.h> #include <epan/conversation.h> +#include <epan/wmem/wmem.h> #include <string.h> @@ -885,7 +886,7 @@ static int hf_h225_stopped = -1; /* NULL */ static int hf_h225_notAvailable = -1; /* NULL */ /*--- End of included file: packet-h225-hf.c ---*/ -#line 106 "../../asn1/h225/packet-h225-template.c" +#line 107 "../../asn1/h225/packet-h225-template.c" /* Initialize the subtree pointers */ static gint ett_h225 = -1; @@ -1134,7 +1135,7 @@ static gint ett_h225_ServiceControlResponse = -1; static gint ett_h225_T_result = -1; /*--- End of included file: packet-h225-ett.c ---*/ -#line 110 "../../asn1/h225/packet-h225-template.c" +#line 111 "../../asn1/h225/packet-h225-template.c" /* Preferences */ static guint h225_tls_port = TLS_PORT_CS; @@ -2882,7 +2883,7 @@ dissect_h225_T_guid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro offset = dissect_h225_GloballyUniqueID(tvb, offset, actx, tree, hf_index); if (guid_tvb) - tvb_get_ntohguid(guid_tvb, 0, call_id_guid = ep_new(e_guid_t)); + tvb_get_ntohguid(guid_tvb, 0, call_id_guid = wmem_new(wmem_packet_scope(), e_guid_t)); actx->value_ptr = NULL; @@ -3685,7 +3686,7 @@ dissect_h225_T_standard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, 0U, 16383U, &value_int, TRUE); gefx = gef_ctx_get(actx->private_data); - if (gefx) gefx->id = ep_strdup_printf("%u", value_int); + if (gefx) gefx->id = wmem_strdup_printf(wmem_packet_scope(), "%u", value_int); return offset; @@ -7534,7 +7535,7 @@ static int dissect_RasMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro /*--- End of included file: packet-h225-fn.c ---*/ -#line 134 "../../asn1/h225/packet-h225-template.c" +#line 135 "../../asn1/h225/packet-h225-template.c" /* Forward declaration we need below */ @@ -10716,7 +10717,7 @@ void proto_register_h225(void) { NULL, HFILL }}, /*--- End of included file: packet-h225-hfarr.c ---*/ -#line 231 "../../asn1/h225/packet-h225-template.c" +#line 232 "../../asn1/h225/packet-h225-template.c" }; /* List of subtrees */ @@ -10967,7 +10968,7 @@ void proto_register_h225(void) { &ett_h225_T_result, /*--- End of included file: packet-h225-ettarr.c ---*/ -#line 237 "../../asn1/h225/packet-h225-template.c" +#line 238 "../../asn1/h225/packet-h225-template.c" }; module_t *h225_module; diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c index 150b9c3b54..d7b69731fc 100644 --- a/epan/dissectors/packet-h245.c +++ b/epan/dissectors/packet-h245.c @@ -3648,7 +3648,7 @@ dissect_h245_T_standard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, 0U, 127U, &value_int, FALSE); gefx = gef_ctx_get(actx->private_data); - if (gefx) gefx->id = ep_strdup_printf("%d", value_int); + if (gefx) gefx->id = wmem_strdup_printf(wmem_packet_scope(), "%d", value_int); return offset; @@ -3709,7 +3709,7 @@ dissect_h245_T_booleanArray(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = ep_new(guint8); + buf = wmem_new(wmem_packet_scope(), guint8); buf[0] = value; value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint8), sizeof(guint8)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ @@ -3736,7 +3736,7 @@ dissect_h245_T_unsignedMin(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)ep_new(guint16); + buf = (guint8 *)wmem_new(wmem_packet_scope(), guint16); phtons(buf, value); value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint16), sizeof(guint16)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ @@ -3763,7 +3763,7 @@ dissect_h245_T_unsignedMax(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)ep_new(guint16); + buf = (guint8 *)wmem_new(wmem_packet_scope(), guint16); phtons(buf, value); value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint16), sizeof(guint16)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ @@ -3790,7 +3790,7 @@ dissect_h245_T_unsigned32Min(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)ep_new(guint32); + buf = (guint8 *)wmem_new(wmem_packet_scope(), guint32); phtonl(buf, value); value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint32), sizeof(guint32)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ @@ -3817,7 +3817,7 @@ dissect_h245_T_unsigned32Max(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)ep_new(guint32); + buf = (guint8 *)wmem_new(wmem_packet_scope(), guint32); phtonl(buf, value); value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint32), sizeof(guint32)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ @@ -6651,7 +6651,7 @@ dissect_h245_T_subMessageIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ 0U, 127U, &subMessageIdentifer, FALSE); if (gefx) { - gefx->subid = ep_strdup_printf("%u", subMessageIdentifer); + gefx->subid = wmem_strdup_printf(wmem_packet_scope(), "%u", subMessageIdentifer); gef_ctx_update_key(gef_ctx_get(actx->private_data)); /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG CapabilityIdentifier: %s", gef_ctx_get(actx->private_data)->key);*/ } @@ -11050,7 +11050,7 @@ dissect_h245_OpenLogicalChannelAck(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t const gchar *olc_key; olc_info_t *olc_req; - upcoming_olc = (!actx->pinfo->fd->flags.visited) ? ep_new0(olc_info_t) : NULL; + upcoming_olc = (!actx->pinfo->fd->flags.visited) ? wmem_new0(wmem_packet_scope(), olc_info_t) : NULL; h223_fw_lc_num = 0; h223_rev_lc_num = 0; diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c index deb2db44d2..3188591a37 100644 --- a/epan/dissectors/packet-h248.c +++ b/epan/dissectors/packet-h248.c @@ -1252,9 +1252,9 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi pi = proto_tree_add_uint(package_tree, hf_248_pkg_param, tvb, offset-2, 2, name_minor); if (pkg->signal_names && ( strval = try_val_to_str(name_minor, pkg->signal_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,name_minor); } else { - strval = ep_strdup_printf("Unknown (%d)",name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",name_minor); } proto_item_set_text(pi,"Signal ID: %s", strval); @@ -1509,9 +1509,9 @@ static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offse const gchar* strval; if (pkg->param_names && ( strval = try_val_to_str(name_minor, pkg->param_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,name_minor); } else { - strval = ep_strdup_printf("Unknown (%d)",name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",name_minor); } proto_item_set_text(pi,"Parameter: %s", strval); @@ -1572,9 +1572,9 @@ static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offs const gchar* strval; if (pkg->event_names && ( strval = try_val_to_str(name_minor, pkg->event_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,name_minor); } else { - strval = ep_strdup_printf("Unknown (%d)",name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",name_minor); } proto_item_set_text(pi,"Event ID: %s", strval); @@ -1637,9 +1637,9 @@ static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int of const gchar* strval; if (pkg->signal_names && ( strval = try_val_to_str(name_minor, pkg->signal_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,name_minor); } else { - strval = ep_strdup_printf("Unknown (%d)",name_minor); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",name_minor); } proto_item_set_text(pi,"Signal ID: %s", strval); @@ -1730,9 +1730,9 @@ static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tv } if (curr_info.sig && curr_info.sig->param_names && ( strval = try_val_to_str(param_id, curr_info.sig->param_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,param_id); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,param_id); } else { - strval = ep_strdup_printf("Unknown (%d)",param_id); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",param_id); } proto_item_set_text(pi,"Parameter: %s", strval); @@ -1807,9 +1807,9 @@ static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t * } if (curr_info.evt && curr_info.evt->param_names && ( strval = try_val_to_str(param_id, curr_info.evt->param_names) )) { - strval = ep_strdup_printf("%s (%d)",strval,param_id); + strval = wmem_strdup_printf(wmem_packet_scope(), "%s (%d)",strval,param_id); } else { - strval = ep_strdup_printf("Unknown (%d)",param_id); + strval = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",param_id); } proto_item_set_text(pi,"Parameter: %s", strval); @@ -2241,8 +2241,8 @@ dissect_h248_T_terminationId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o } } else { curr_info.term->len = 0; - curr_info.term->buffer = (guint8*)ep_strdup(""); - curr_info.term->str = ep_strdup("?"); + curr_info.term->buffer = (guint8*)wmem_strdup(wmem_packet_scope(), ""); + curr_info.term->str = wmem_strdup(wmem_packet_scope(), "?"); } @@ -2259,7 +2259,7 @@ static const ber_sequence_t TerminationID_sequence[] = { static int dissect_h248_TerminationID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 315 "../../asn1/h248/h248.cnf" - curr_info.term = ep_new0(gcp_term_t); + curr_info.term = wmem_new0(wmem_packet_scope(), gcp_term_t); wild_term = GCP_WILDCARD_NONE; offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, diff --git a/epan/dissectors/packet-h323.c b/epan/dissectors/packet-h323.c index 6ae3c3767b..0e123c20a1 100644 --- a/epan/dissectors/packet-h323.c +++ b/epan/dissectors/packet-h323.c @@ -37,6 +37,7 @@ #include <epan/packet.h> #include <epan/oids.h> #include <epan/asn1.h> +#include <epan/wmem/wmem.h> #include "packet-per.h" #include "packet-h225.h" @@ -51,7 +52,7 @@ gef_ctx_t* gef_ctx_alloc(gef_ctx_t *parent, const gchar *type) { gef_ctx_t *gefx; - gefx = ep_new0(gef_ctx_t); + gefx = wmem_new0(wmem_packet_scope(), gef_ctx_t); gefx->signature = GEF_CTX_SIGNATURE; gefx->parent = parent; gefx->type = type; @@ -83,7 +84,7 @@ void gef_ctx_update_key(gef_ctx_t *gefx) { if (!gefx) return; parent_key = (gefx->parent) ? gefx->parent->key : NULL; - gefx->key = ep_strdup_printf( + gefx->key = wmem_strdup_printf(wmem_packet_scope(), "%s%s" /* parent prefix */ "%s%s%s" /* type, id */ "%s%s" /* subid */, @@ -128,7 +129,7 @@ static int hf_h323_timeToLive = -1; /* TimeToLive */ static int hf_h323_includeFastStart = -1; /* NULL */ /*--- End of included file: packet-h323-hf.c ---*/ -#line 91 "../../asn1/h323/packet-h323-template.c" +#line 92 "../../asn1/h323/packet-h323-template.c" /* Initialize the subtree pointers */ @@ -149,7 +150,7 @@ static gint ett_h323_T_fastStart = -1; static gint ett_h323_StatusInquiry_RD = -1; /*--- End of included file: packet-h323-ett.c ---*/ -#line 94 "../../asn1/h323/packet-h323-template.c" +#line 95 "../../asn1/h323/packet-h323-template.c" /*--- Included file: packet-h323-fn.c ---*/ @@ -440,7 +441,7 @@ static int dissect_RobustnessData_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, /*--- End of included file: packet-h323-fn.c ---*/ -#line 96 "../../asn1/h323/packet-h323-template.c" +#line 97 "../../asn1/h323/packet-h323-template.c" /*--- proto_register_h323 ----------------------------------------------*/ void proto_register_h323(void) { @@ -564,7 +565,7 @@ void proto_register_h323(void) { NULL, HFILL }}, /*--- End of included file: packet-h323-hfarr.c ---*/ -#line 103 "../../asn1/h323/packet-h323-template.c" +#line 104 "../../asn1/h323/packet-h323-template.c" }; /* List of subtrees */ @@ -587,7 +588,7 @@ void proto_register_h323(void) { &ett_h323_StatusInquiry_RD, /*--- End of included file: packet-h323-ettarr.c ---*/ -#line 108 "../../asn1/h323/packet-h323-template.c" +#line 109 "../../asn1/h323/packet-h323-template.c" }; /* Register protocol */ diff --git a/epan/dissectors/packet-h450-ros.c b/epan/dissectors/packet-h450-ros.c index a4a57fd107..2115067f0f 100644 --- a/epan/dissectors/packet-h450-ros.c +++ b/epan/dissectors/packet-h450-ros.c @@ -37,6 +37,7 @@ #include <epan/strutil.h> #include <epan/asn1.h> #include <epan/expert.h> +#include <epan/wmem/wmem.h> #include "packet-per.h" @@ -71,7 +72,7 @@ static int hf_h450_ros_returnResultProblem = -1; /* ReturnResultProblem */ static int hf_h450_ros_returnErrorProblem = -1; /* ReturnErrorProblem */ /*--- End of included file: packet-h450-ros-hf.c ---*/ -#line 42 "../../asn1/h450-ros/packet-h450-ros-template.c" +#line 43 "../../asn1/h450-ros/packet-h450-ros-template.c" /* Initialize the subtree pointers */ @@ -87,7 +88,7 @@ static gint ett_h450_ros_Reject = -1; static gint ett_h450_ros_T_problem = -1; /*--- End of included file: packet-h450-ros-ett.c ---*/ -#line 45 "../../asn1/h450-ros/packet-h450-ros-template.c" +#line 46 "../../asn1/h450-ros/packet-h450-ros-template.c" static expert_field ei_ros_undecoded = EI_INIT; @@ -226,11 +227,11 @@ dissect_h450_ros_Invoke(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, if (!arg_handle || !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle)))) { if (actx->rose_ctx->d.code == 0) - descr = ep_strdup_printf("INV: %d", actx->rose_ctx->d.code_local); + descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %d", actx->rose_ctx->d.code_local); else if (actx->rose_ctx->d.code == 1) - descr = ep_strdup_printf("INV: %s", actx->rose_ctx->d.code_global); + descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %s", actx->rose_ctx->d.code_global); } else { - descr = ep_strdup_printf("INV:"); + descr = wmem_strdup_printf(wmem_packet_scope(), "INV:"); } if (actx->rose_ctx->apdu_depth >= 0) @@ -309,11 +310,11 @@ dissect_h450_ros_ReturnResult(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act if (!res_handle || !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle)))) { if (actx->rose_ctx->d.code == 0) - descr = ep_strdup_printf("RES: %d", actx->rose_ctx->d.code_local); + descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %d", actx->rose_ctx->d.code_local); else if (actx->rose_ctx->d.code == 1) - descr = ep_strdup_printf("RES: %s", actx->rose_ctx->d.code_global); + descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %s", actx->rose_ctx->d.code_global); } else { - descr = ep_strdup_printf("RES:"); + descr = wmem_strdup_printf(wmem_packet_scope(), "RES:"); } if (actx->rose_ctx->apdu_depth >= 0) @@ -379,11 +380,11 @@ dissect_h450_ros_ReturnError(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx if (!err_handle || !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle)))) { if (actx->rose_ctx->d.code == 0) - descr = ep_strdup_printf("ERR: %d", actx->rose_ctx->d.code_local); + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %d", actx->rose_ctx->d.code_local); else if (actx->rose_ctx->d.code == 1) - descr = ep_strdup_printf("ERR: %s", actx->rose_ctx->d.code_global); + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %s", actx->rose_ctx->d.code_global); } else { - descr = ep_strdup_printf("ERR:"); + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR:"); } if (actx->rose_ctx->apdu_depth >= 0) @@ -536,7 +537,7 @@ dissect_h450_ros_Reject(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, ett_h450_ros_Reject, Reject_sequence); #line 11 "../../asn1/ros/ros-rej.cnf" - descr = ep_strdup_printf("REJ: %s", problem_str); + descr = wmem_strdup_printf(wmem_packet_scope(), "REJ: %s", problem_str); if (actx->rose_ctx->apdu_depth >= 0) proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); @@ -580,7 +581,7 @@ dissect_h450_ros_ROS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr /*--- End of included file: packet-h450-ros-fn.c ---*/ -#line 74 "../../asn1/h450-ros/packet-h450-ros-template.c" +#line 75 "../../asn1/h450-ros/packet-h450-ros-template.c" /*--- proto_register_h450_ros -----------------------------------------------*/ void proto_register_h450_ros(void) { @@ -672,7 +673,7 @@ void proto_register_h450_ros(void) { "ReturnErrorProblem", HFILL }}, /*--- End of included file: packet-h450-ros-hfarr.c ---*/ -#line 81 "../../asn1/h450-ros/packet-h450-ros-template.c" +#line 82 "../../asn1/h450-ros/packet-h450-ros-template.c" }; /* List of subtrees */ @@ -690,7 +691,7 @@ void proto_register_h450_ros(void) { &ett_h450_ros_T_problem, /*--- End of included file: packet-h450-ros-ettarr.c ---*/ -#line 86 "../../asn1/h450-ros/packet-h450-ros-template.c" +#line 87 "../../asn1/h450-ros/packet-h450-ros-template.c" }; static ei_register_info ei[] = { diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index bede9a9d62..c5e2b92723 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -1208,7 +1208,7 @@ dissect_ldap_LDAPString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset Filter_string=ldapstring; } else if (hf_index == hf_ldap_type) { /* remember attribute type name */ - attr_type = ep_strdup(ldapstring); + attr_type = wmem_strdup(wmem_packet_scope(), ldapstring); /* append it to the parent entry */ proto_item_append_text(tree, " %s", attr_type); @@ -1836,7 +1836,7 @@ dissect_ldap_T_and_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset #line 562 "../../asn1/ldap/ldap.cnf" if(and_filter_string){ - and_filter_string=ep_strdup_printf("(&%s%s)",and_filter_string,Filter_string); + and_filter_string=wmem_strdup_printf(wmem_packet_scope(), "(&%s%s)",and_filter_string,Filter_string); } else { and_filter_string=Filter_string; } @@ -1870,7 +1870,7 @@ dissect_ldap_T_and(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, if(and_filter_string) { proto_item_append_text(it, "%s", and_filter_string); - Filter_string=ep_strdup_printf("%s",and_filter_string); + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "%s",and_filter_string); } and_filter_string=old_and_filter_string; @@ -1887,7 +1887,7 @@ dissect_ldap_T_or_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset #line 589 "../../asn1/ldap/ldap.cnf" if(or_filter_string){ - or_filter_string=ep_strdup_printf("(|%s%s)",or_filter_string,Filter_string); + or_filter_string=wmem_strdup_printf(wmem_packet_scope(), "(|%s%s)",or_filter_string,Filter_string); } else { or_filter_string=Filter_string; } @@ -1920,7 +1920,7 @@ dissect_ldap_T_or(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, if(or_filter_string) { proto_item_append_text(it, "%s", or_filter_string); - Filter_string=ep_strdup_printf("%s",or_filter_string); + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "%s",or_filter_string); } or_filter_string=old_or_filter_string; @@ -1936,7 +1936,7 @@ dissect_ldap_T_not(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index); #line 618 "../../asn1/ldap/ldap.cnf" - Filter_string=ep_strdup_printf("(!%s)",string_or_null(Filter_string)); + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(!%s)",string_or_null(Filter_string)); return offset; @@ -1974,7 +1974,7 @@ dissect_ldap_T_equalityMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index); #line 539 "../../asn1/ldap/ldap.cnf" - Filter_string=ep_strdup_printf("(%s=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); @@ -2006,15 +2006,15 @@ dissect_ldap_T_substringFilter_substrings_item(gboolean implicit_tag _U_, tvbuff #line 644 "../../asn1/ldap/ldap.cnf" if (substring_item_final) { - substring_value=ep_strdup_printf("%s%s", + substring_value=wmem_strdup_printf(wmem_packet_scope(), "%s%s", (substring_value?substring_value:"*"), substring_item_final); } else if (substring_item_any) { - substring_value=ep_strdup_printf("%s%s*", + substring_value=wmem_strdup_printf(wmem_packet_scope(), "%s%s*", (substring_value?substring_value:"*"), substring_item_any); } else if (substring_item_init) { - substring_value=ep_strdup_printf("%s*", + substring_value=wmem_strdup_printf(wmem_packet_scope(), "%s*", substring_item_init); } @@ -2062,7 +2062,7 @@ dissect_ldap_SubstringFilter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, SubstringFilter_sequence, hf_index, ett_ldap_SubstringFilter); - Filter_string=ep_strdup_printf("(%s=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s=%s)", string_or_null(attr_type), string_or_null(substring_value)); proto_item_append_text(it, "%s", Filter_string); @@ -2080,7 +2080,7 @@ dissect_ldap_T_greaterOrEqual(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index); #line 545 "../../asn1/ldap/ldap.cnf" - Filter_string=ep_strdup_printf("(%s>=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s>=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); @@ -2096,7 +2096,7 @@ dissect_ldap_T_lessOrEqual(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index); #line 551 "../../asn1/ldap/ldap.cnf" - Filter_string=ep_strdup_printf("(%s<=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s<=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); @@ -2112,7 +2112,7 @@ dissect_ldap_T_present(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset offset = dissect_ldap_AttributeDescription(implicit_tag, tvb, offset, actx, tree, hf_index); #line 615 "../../asn1/ldap/ldap.cnf" - Filter_string=ep_strdup_printf("(%s=*)",string_or_null(Filter_string)); + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s=*)",string_or_null(Filter_string)); return offset; @@ -2125,7 +2125,7 @@ dissect_ldap_T_approxMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index); #line 557 "../../asn1/ldap/ldap.cnf" - Filter_string=ep_strdup_printf("(%s~=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s~=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); @@ -2191,7 +2191,7 @@ dissect_ldap_T_extensibleMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset = dissect_ldap_MatchingRuleAssertion(implicit_tag, tvb, offset, actx, tree, hf_index); #line 636 "../../asn1/ldap/ldap.cnf" - Filter_string=ep_strdup_printf("(%s:%s%s%s=%s)", + Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s:%s%s%s=%s)", (attr_type?attr_type:""), (matching_rule_dnattr?"dn:":""), (matching_rule_string?matching_rule_string:""), diff --git a/epan/dissectors/packet-p1.c b/epan/dissectors/packet-p1.c index c1cefd992c..e89d661f21 100644 --- a/epan/dissectors/packet-p1.c +++ b/epan/dissectors/packet-p1.c @@ -39,6 +39,7 @@ #include <epan/oids.h> #include <epan/asn1.h> #include <epan/expert.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-acse.h" @@ -655,7 +656,7 @@ static int hf_p1_G3FacsimileNonBasicParameters_jpeg = -1; static int hf_p1_G3FacsimileNonBasicParameters_processable_mode_26 = -1; /*--- End of included file: packet-p1-hf.c ---*/ -#line 81 "../../asn1/p1/packet-p1-template.c" +#line 82 "../../asn1/p1/packet-p1-template.c" /* Initialize the subtree pointers */ static gint ett_p1 = -1; @@ -852,7 +853,7 @@ static gint ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientMessageSubmissio static gint ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeSubmissionFields = -1; /*--- End of included file: packet-p1-ett.c ---*/ -#line 92 "../../asn1/p1/packet-p1-template.c" +#line 93 "../../asn1/p1/packet-p1-template.c" static expert_field ei_p1_unknown_extension_attribute_type = EI_INIT; static expert_field ei_p1_unknown_standard_extension = EI_INIT; @@ -908,7 +909,7 @@ static const value_string p3_err_code_string_vals[] = { /*--- End of included file: packet-p1-table.c ---*/ -#line 104 "../../asn1/p1/packet-p1-template.c" +#line 105 "../../asn1/p1/packet-p1-template.c" /*--- Included file: packet-p1-fn.c ---*/ @@ -1642,7 +1643,7 @@ static int dissect_p1_GlobalDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 1087 "../../asn1/p1/p1.cnf" - oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; + oraddress = (char *)wmem_alloc(wmem_packet_scope(), MAX_ORA_STR_LEN); oraddress[0] = '\0'; address_item = tree; offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, @@ -2129,7 +2130,7 @@ static const ber_sequence_t BuiltInDomainDefinedAttribute_sequence[] = { static int dissect_p1_BuiltInDomainDefinedAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 1050 "../../asn1/p1/p1.cnf" - ddatype = (char *)ep_alloc(MAX_ORA_STR_LEN); ddatype[0] = '\0'; + ddatype = (char *)wmem_alloc(wmem_packet_scope(), MAX_ORA_STR_LEN); ddatype[0] = '\0'; offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, BuiltInDomainDefinedAttribute_sequence, hf_index, ett_p1_BuiltInDomainDefinedAttribute); @@ -2284,7 +2285,7 @@ int dissect_p1_ORName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 1068 "../../asn1/p1/p1.cnf" - oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; + oraddress = (char *)wmem_alloc(wmem_packet_scope(), MAX_ORA_STR_LEN); oraddress[0] = '\0'; address_item = NULL; doing_address = TRUE; @@ -2502,10 +2503,10 @@ dissect_p1_BuiltInContentType_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in /* convert integer content type to oid for dispatch when the content is found */ switch(ict) { case 2: - content_type_id = ep_strdup("2.6.1.10.0"); + content_type_id = wmem_strdup(wmem_packet_scope(), "2.6.1.10.0"); break; case 22: - content_type_id = ep_strdup("2.6.1.10.1"); + content_type_id = wmem_strdup(wmem_packet_scope(), "2.6.1.10.1"); break; default: content_type_id = NULL; @@ -5717,7 +5718,7 @@ int dissect_p1_ORAddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 1055 "../../asn1/p1/p1.cnf" - oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; + oraddress = (char *)wmem_alloc(wmem_packet_scope(), MAX_ORA_STR_LEN); oraddress[0] = '\0'; doing_address = TRUE; address_item = NULL; @@ -7090,7 +7091,7 @@ static const ber_sequence_t TeletexDomainDefinedAttribute_sequence[] = { static int dissect_p1_TeletexDomainDefinedAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 941 "../../asn1/p1/p1.cnf" - ddatype = (char *)ep_alloc(MAX_ORA_STR_LEN); ddatype[0] = '\0'; + ddatype = (char *)wmem_alloc(wmem_packet_scope(), MAX_ORA_STR_LEN); ddatype[0] = '\0'; offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, TeletexDomainDefinedAttribute_sequence, hf_index, ett_p1_TeletexDomainDefinedAttribute); @@ -8208,7 +8209,7 @@ static void dissect_SecurityClassification_PDU(tvbuff_t *tvb _U_, packet_info *p /*--- End of included file: packet-p1-fn.c ---*/ -#line 106 "../../asn1/p1/packet-p1-template.c" +#line 107 "../../asn1/p1/packet-p1-template.c" /*--- Included file: packet-p1-table11.c ---*/ @@ -8240,7 +8241,7 @@ static const ros_opr_t p3_opr_tab[] = { /*--- End of included file: packet-p1-table11.c ---*/ -#line 108 "../../asn1/p1/packet-p1-template.c" +#line 109 "../../asn1/p1/packet-p1-template.c" /*--- Included file: packet-p1-table21.c ---*/ #line 1 "../../asn1/p1/packet-p1-table21.c" @@ -8285,7 +8286,7 @@ static const ros_err_t p3_err_tab[] = { /*--- End of included file: packet-p1-table21.c ---*/ -#line 109 "../../asn1/p1/packet-p1-template.c" +#line 110 "../../asn1/p1/packet-p1-template.c" static const ros_info_t p3_ros_info = { "P3", @@ -10697,7 +10698,7 @@ void proto_register_p1(void) { NULL, HFILL }}, /*--- End of included file: packet-p1-hfarr.c ---*/ -#line 260 "../../asn1/p1/packet-p1-template.c" +#line 261 "../../asn1/p1/packet-p1-template.c" }; /* List of subtrees */ @@ -10896,7 +10897,7 @@ void proto_register_p1(void) { &ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeSubmissionFields, /*--- End of included file: packet-p1-ettarr.c ---*/ -#line 273 "../../asn1/p1/packet-p1-template.c" +#line 274 "../../asn1/p1/packet-p1-template.c" }; static ei_register_info ei[] = { @@ -11099,7 +11100,7 @@ void proto_reg_handoff_p1(void) { /*--- End of included file: packet-p1-dis-tab.c ---*/ -#line 319 "../../asn1/p1/packet-p1-template.c" +#line 320 "../../asn1/p1/packet-p1-template.c" /* APPLICATION CONTEXT */ diff --git a/epan/dissectors/packet-pkcs1.c b/epan/dissectors/packet-pkcs1.c index bb594fd768..192f70985a 100644 --- a/epan/dissectors/packet-pkcs1.c +++ b/epan/dissectors/packet-pkcs1.c @@ -37,6 +37,7 @@ #include <epan/packet.h> #include <epan/oids.h> #include <epan/asn1.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-pkcs1.h" @@ -84,7 +85,7 @@ static int hf_pkcs1_r = -1; /* INTEGER */ static int hf_pkcs1_s = -1; /* INTEGER */ /*--- End of included file: packet-pkcs1-hf.c ---*/ -#line 44 "../../asn1/pkcs1/packet-pkcs1-template.c" +#line 45 "../../asn1/pkcs1/packet-pkcs1-template.c" /* Initialize the subtree pointers */ @@ -102,7 +103,7 @@ static gint ett_pkcs1_DSA_Sig_Value = -1; static gint ett_pkcs1_ECDSA_Sig_Value = -1; /*--- End of included file: packet-pkcs1-ett.c ---*/ -#line 47 "../../asn1/pkcs1/packet-pkcs1-template.c" +#line 48 "../../asn1/pkcs1/packet-pkcs1-template.c" /*--- Included file: packet-pkcs1-fn.c ---*/ @@ -372,7 +373,7 @@ static void dissect_ECParameters_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, /*--- End of included file: packet-pkcs1-fn.c ---*/ -#line 49 "../../asn1/pkcs1/packet-pkcs1-template.c" +#line 50 "../../asn1/pkcs1/packet-pkcs1-template.c" /*--- proto_register_pkcs1 ----------------------------------------------*/ void proto_register_pkcs1(void) { @@ -508,7 +509,7 @@ void proto_register_pkcs1(void) { "INTEGER", HFILL }}, /*--- End of included file: packet-pkcs1-hfarr.c ---*/ -#line 56 "../../asn1/pkcs1/packet-pkcs1-template.c" +#line 57 "../../asn1/pkcs1/packet-pkcs1-template.c" }; /* List of subtrees */ @@ -528,7 +529,7 @@ void proto_register_pkcs1(void) { &ett_pkcs1_ECDSA_Sig_Value, /*--- End of included file: packet-pkcs1-ettarr.c ---*/ -#line 61 "../../asn1/pkcs1/packet-pkcs1-template.c" +#line 62 "../../asn1/pkcs1/packet-pkcs1-template.c" }; /* Register protocol */ @@ -557,7 +558,7 @@ void proto_reg_handoff_pkcs1(void) { /*--- End of included file: packet-pkcs1-dis-tab.c ---*/ -#line 76 "../../asn1/pkcs1/packet-pkcs1-template.c" +#line 77 "../../asn1/pkcs1/packet-pkcs1-template.c" register_ber_oid_dissector("1.2.840.113549.2.2", dissect_ber_oid_NULL_callback, proto_pkcs1, "md2"); register_ber_oid_dissector("1.2.840.113549.2.4", dissect_ber_oid_NULL_callback, proto_pkcs1, "md4"); diff --git a/epan/dissectors/packet-pkcs12.c b/epan/dissectors/packet-pkcs12.c index c6111f240c..ec17ce5ce6 100644 --- a/epan/dissectors/packet-pkcs12.c +++ b/epan/dissectors/packet-pkcs12.c @@ -363,14 +363,14 @@ int PBE_decrypt_data(const char *object_identifier_id_param, tvbuff_t *encrypted } /* allocate buffers */ - key = (char *)ep_alloc(keylen); + key = (char *)wmem_alloc(wmem_packet_scope(), keylen); if(!generate_key_or_iv(1 /*LEY */, salt, iteration_count, password, keylen, key)) return FALSE; if(ivlen) { - iv = (char *)ep_alloc(ivlen); + iv = (char *)wmem_alloc(wmem_packet_scope(), ivlen); if(!generate_key_or_iv(2 /* IV */, salt, iteration_count, password, ivlen, iv)) return FALSE; diff --git a/epan/dissectors/packet-q932-ros.c b/epan/dissectors/packet-q932-ros.c index 22c7cfe217..f8793ced61 100644 --- a/epan/dissectors/packet-q932-ros.c +++ b/epan/dissectors/packet-q932-ros.c @@ -37,6 +37,7 @@ #include <epan/strutil.h> #include <epan/asn1.h> #include <epan/expert.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" @@ -75,7 +76,7 @@ static int hf_q932_ros_present = -1; /* INTEGER */ static int hf_q932_ros_InvokeId_present = -1; /* InvokeId_present */ /*--- End of included file: packet-q932-ros-hf.c ---*/ -#line 42 "../../asn1/q932-ros/packet-q932-ros-template.c" +#line 43 "../../asn1/q932-ros/packet-q932-ros-template.c" /* Initialize the subtree pointers */ @@ -93,7 +94,7 @@ static gint ett_q932_ros_T_problem = -1; static gint ett_q932_ros_InvokeId = -1; /*--- End of included file: packet-q932-ros-ett.c ---*/ -#line 45 "../../asn1/q932-ros/packet-q932-ros-template.c" +#line 46 "../../asn1/q932-ros/packet-q932-ros-template.c" static expert_field ei_ros_undecoded = EI_INIT; @@ -291,11 +292,11 @@ dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset if (!arg_handle || !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle)))) { if (actx->rose_ctx->d.code == 0) - descr = ep_strdup_printf("INV: %d", actx->rose_ctx->d.code_local); + descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %d", actx->rose_ctx->d.code_local); else if (actx->rose_ctx->d.code == 1) - descr = ep_strdup_printf("INV: %s", actx->rose_ctx->d.code_global); + descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %s", actx->rose_ctx->d.code_global); } else { - descr = ep_strdup_printf("INV:"); + descr = wmem_strdup_printf(wmem_packet_scope(), "INV:"); } if (actx->rose_ctx->apdu_depth >= 0) @@ -384,11 +385,11 @@ dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int if (!res_handle || !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle)))) { if (actx->rose_ctx->d.code == 0) - descr = ep_strdup_printf("RES: %d", actx->rose_ctx->d.code_local); + descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %d", actx->rose_ctx->d.code_local); else if (actx->rose_ctx->d.code == 1) - descr = ep_strdup_printf("RES: %s", actx->rose_ctx->d.code_global); + descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %s", actx->rose_ctx->d.code_global); } else { - descr = ep_strdup_printf("RES:"); + descr = wmem_strdup_printf(wmem_packet_scope(), "RES:"); } if (actx->rose_ctx->apdu_depth >= 0) @@ -464,11 +465,11 @@ dissect_q932_ros_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o if (!err_handle || !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle)))) { if (actx->rose_ctx->d.code == 0) - descr = ep_strdup_printf("ERR: %d", actx->rose_ctx->d.code_local); + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %d", actx->rose_ctx->d.code_local); else if (actx->rose_ctx->d.code == 1) - descr = ep_strdup_printf("ERR: %s", actx->rose_ctx->d.code_global); + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %s", actx->rose_ctx->d.code_global); } else { - descr = ep_strdup_printf("ERR:"); + descr = wmem_strdup_printf(wmem_packet_scope(), "ERR:"); } if (actx->rose_ctx->apdu_depth >= 0) @@ -621,7 +622,7 @@ dissect_q932_ros_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset Reject_sequence, hf_index, ett_q932_ros_Reject); #line 11 "../../asn1/ros/ros-rej.cnf" - descr = ep_strdup_printf("REJ: %s", problem_str); + descr = wmem_strdup_printf(wmem_packet_scope(), "REJ: %s", problem_str); if (actx->rose_ctx->apdu_depth >= 0) proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); @@ -676,7 +677,7 @@ static int dissect_ROS_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree /*--- End of included file: packet-q932-ros-fn.c ---*/ -#line 62 "../../asn1/q932-ros/packet-q932-ros-template.c" +#line 63 "../../asn1/q932-ros/packet-q932-ros-template.c" /*--- dissect_q932_ros -----------------------------------------------------*/ static int dissect_q932_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { @@ -791,7 +792,7 @@ void proto_register_q932_ros(void) { "InvokeId_present", HFILL }}, /*--- End of included file: packet-q932-ros-hfarr.c ---*/ -#line 76 "../../asn1/q932-ros/packet-q932-ros-template.c" +#line 77 "../../asn1/q932-ros/packet-q932-ros-template.c" }; /* List of subtrees */ @@ -811,7 +812,7 @@ void proto_register_q932_ros(void) { &ett_q932_ros_InvokeId, /*--- End of included file: packet-q932-ros-ettarr.c ---*/ -#line 81 "../../asn1/q932-ros/packet-q932-ros-template.c" +#line 82 "../../asn1/q932-ros/packet-q932-ros-template.c" }; static ei_register_info ei[] = { diff --git a/epan/dissectors/packet-rnsap.c b/epan/dissectors/packet-rnsap.c index 421aa352e6..7f60599a55 100644 --- a/epan/dissectors/packet-rnsap.c +++ b/epan/dissectors/packet-rnsap.c @@ -5353,7 +5353,7 @@ dissect_rnsap_ProcedureID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U ett_rnsap_ProcedureID, ProcedureID_sequence); #line 92 "../../asn1/rnsap/rnsap.cnf" - ProcedureID = ep_strdup_printf("%s/%s", + ProcedureID = wmem_strdup_printf(wmem_packet_scope(), "%s/%s", val_to_str_ext(ProcedureCode, &rnsap_ProcedureCode_vals_ext, "unknown(%u)"), val_to_str(ddMode, rnsap_DdMode_vals, "unknown(%u)")); diff --git a/epan/dissectors/packet-x509if.c b/epan/dissectors/packet-x509if.c index d9664dc163..db2a40c79c 100644 --- a/epan/dissectors/packet-x509if.c +++ b/epan/dissectors/packet-x509if.c @@ -37,6 +37,7 @@ #include <epan/packet.h> #include <epan/oids.h> #include <epan/asn1.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-dap.h" @@ -213,7 +214,7 @@ static int hf_x509if_AllowedSubset_oneLevel = -1; static int hf_x509if_AllowedSubset_wholeSubtree = -1; /*--- End of included file: packet-x509if-hf.c ---*/ -#line 49 "../../asn1/x509if/packet-x509if-template.c" +#line 50 "../../asn1/x509if/packet-x509if-template.c" /* Initialize the subtree pointers */ @@ -294,7 +295,7 @@ static gint ett_x509if_SEQUENCE_SIZE_1_MAX_OF_AttributeType = -1; static gint ett_x509if_SET_SIZE_1_MAX_OF_DirectoryString = -1; /*--- End of included file: packet-x509if-ett.c ---*/ -#line 52 "../../asn1/x509if/packet-x509if-template.c" +#line 53 "../../asn1/x509if/packet-x509if-template.c" static const char *object_identifier_id = NULL; static proto_tree *top_of_dn = NULL; @@ -666,7 +667,7 @@ dissect_x509if_AttributeValueAssertion(gboolean implicit_tag _U_, tvbuff_t *tvb #line 407 "../../asn1/x509if/x509if.cnf" ava_hf_index = hf_index; - last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; + last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); *last_ava = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -746,7 +747,7 @@ dissect_x509if_T_type_02(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse if((fmt = val_to_str(hf_index, fmt_vals, "")) && *fmt) { /* we have a format */ - last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; + last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); *last_ava = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); g_snprintf(last_ava, MAX_AVA_STR_LEN, "%s %s", name, fmt); @@ -800,7 +801,7 @@ dissect_x509if_T_atadv_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o /* we have a format */ if (!last_ava) { - last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); + last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); } if(!(name = oid_resolved_from_string(object_identifier_id))) @@ -911,7 +912,7 @@ dissect_x509if_RelativeDistinguishedName(gboolean implicit_tag _U_, tvbuff_t *tv rdn_one_value = FALSE; top_of_rdn = tree; - last_rdn = (char *)ep_alloc(MAX_DN_STR_LEN); *last_rdn = '\0'; + last_rdn = (char *)wmem_alloc(wmem_packet_scope(), MAX_DN_STR_LEN); *last_rdn = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, @@ -924,7 +925,7 @@ dissect_x509if_RelativeDistinguishedName(gboolean implicit_tag _U_, tvbuff_t *tv /* now append this to the DN */ if (last_dn) { if(*last_dn) { - temp_dn = (char *)ep_alloc(MAX_DN_STR_LEN); /* is there a better way to use ep_alloc here ? */ + temp_dn = (char *)wmem_alloc(wmem_packet_scope(), MAX_DN_STR_LEN); /* is there a better way to use ep_alloc here ? */ g_snprintf(temp_dn, MAX_DN_STR_LEN, "%s,%s", last_rdn, last_dn); last_dn[0] = '\0'; g_strlcat(last_dn, temp_dn, MAX_DN_STR_LEN); @@ -972,7 +973,7 @@ dissect_x509if_RDNSequence(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off const char *fmt; dn_one_rdn = FALSE; /* reset */ - last_dn = (char *)ep_alloc(MAX_DN_STR_LEN); *last_dn = '\0'; + last_dn = (char *)wmem_alloc(wmem_packet_scope(), MAX_DN_STR_LEN); *last_dn = '\0'; top_of_dn = NULL; register_frame_end_routine (actx->pinfo, x509if_frame_end); @@ -2097,7 +2098,7 @@ static void dissect_HierarchyBelow_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_ /*--- End of included file: packet-x509if-fn.c ---*/ -#line 90 "../../asn1/x509if/packet-x509if-template.c" +#line 91 "../../asn1/x509if/packet-x509if-template.c" const char * x509if_get_last_dn(void) { @@ -2763,7 +2764,7 @@ void proto_register_x509if(void) { NULL, HFILL }}, /*--- End of included file: packet-x509if-hfarr.c ---*/ -#line 135 "../../asn1/x509if/packet-x509if-template.c" +#line 136 "../../asn1/x509if/packet-x509if-template.c" }; /* List of subtrees */ @@ -2846,7 +2847,7 @@ void proto_register_x509if(void) { &ett_x509if_SET_SIZE_1_MAX_OF_DirectoryString, /*--- End of included file: packet-x509if-ettarr.c ---*/ -#line 140 "../../asn1/x509if/packet-x509if-template.c" +#line 141 "../../asn1/x509if/packet-x509if-template.c" }; /* Register protocol */ @@ -2904,6 +2905,6 @@ void proto_reg_handoff_x509if(void) { /*--- End of included file: packet-x509if-dis-tab.c ---*/ -#line 159 "../../asn1/x509if/packet-x509if-template.c" +#line 160 "../../asn1/x509if/packet-x509if-template.c" } |