aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
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 /epan/dissectors
parente6e7c1181bd33a94de00e137685f39520bd858dc (diff)
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 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-acse.c2
-rw-r--r--epan/dissectors/packet-ansi_map.c19
-rw-r--r--epan/dissectors/packet-dop.c15
-rw-r--r--epan/dissectors/packet-h225.c15
-rw-r--r--epan/dissectors/packet-h245.c16
-rw-r--r--epan/dissectors/packet-h248.c30
-rw-r--r--epan/dissectors/packet-h323.c15
-rw-r--r--epan/dissectors/packet-h450-ros.c31
-rw-r--r--epan/dissectors/packet-ldap.c32
-rw-r--r--epan/dissectors/packet-p1.c33
-rw-r--r--epan/dissectors/packet-pkcs1.c13
-rw-r--r--epan/dissectors/packet-pkcs12.c4
-rw-r--r--epan/dissectors/packet-q932-ros.c31
-rw-r--r--epan/dissectors/packet-rnsap.c2
-rw-r--r--epan/dissectors/packet-x509if.c25
15 files changed, 146 insertions, 137 deletions
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"
}