summaryrefslogtreecommitdiff
path: root/asn1
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-06-19 23:08:58 +0000
committerEvan Huus <eapache@gmail.com>2013-06-19 23:08:58 +0000
commit8b0f1addd990ae1b6616dbb5a21e530942461154 (patch)
treee72f102e0cec19ee49b5729f8dcfa62afa3a931d /asn1
parente6e7c1181bd33a94de00e137685f39520bd858dc (diff)
downloadwireshark-8b0f1addd990ae1b6616dbb5a21e530942461154.tar.gz
Apparently one of our major global headers must include emem.h, because I just
found a bunch more asn1 dissectors using emem without ever directly including the header. Convert those to wmem as well, which involves add a number of #include directives since dissectors do *not* automatically pull in the wmem headers. svn path=/trunk/; revision=50066
Diffstat (limited to 'asn1')
-rw-r--r--asn1/acse/acse.cnf2
-rw-r--r--asn1/ansi_map/packet-ansi_map-template.c9
-rw-r--r--asn1/dop/packet-dop-template.c3
-rw-r--r--asn1/h225/h225.cnf4
-rw-r--r--asn1/h225/packet-h225-template.c1
-rw-r--r--asn1/h245/h245.cnf16
-rw-r--r--asn1/h248/h248.cnf6
-rw-r--r--asn1/h248/packet-h248-template.c24
-rw-r--r--asn1/h323/packet-h323-template.c5
-rw-r--r--asn1/h450-ros/packet-h450-ros-template.c1
-rw-r--r--asn1/kerberos/kerberos.cnf14
-rw-r--r--asn1/ldap/ldap.cnf32
-rw-r--r--asn1/p1/p1.cnf14
-rw-r--r--asn1/p1/packet-p1-template.c1
-rw-r--r--asn1/pkcs1/packet-pkcs1-template.c1
-rw-r--r--asn1/pkcs12/packet-pkcs12-template.c4
-rw-r--r--asn1/q932-ros/packet-q932-ros-template.c1
-rw-r--r--asn1/rnsap/rnsap.cnf2
-rw-r--r--asn1/ros/ros-err.cnf6
-rw-r--r--asn1/ros/ros-inv.cnf6
-rw-r--r--asn1/ros/ros-rej.cnf2
-rw-r--r--asn1/ros/ros-res.cnf6
-rw-r--r--asn1/x509if/packet-x509if-template.c1
-rw-r--r--asn1/x509if/x509if.cnf12
24 files changed, 91 insertions, 82 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