aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/x411
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2007-10-06 20:37:52 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2007-10-06 20:37:52 +0000
commitfeced5f683b54e260aa42fee7ab1ddcc218490b5 (patch)
tree57c06b97d7dac10e7dbfc94e60b762cef09fd67b /asn1/x411
parentaf2d10d5bf8e81d95682219ccbe0f9fd4a9188d9 (diff)
- Initialize address_item in MessageIdentifier to avoid a crash in handling
LocalIdentifier when problems with the GlobalDomainIdentifier. - Initialize global pointers to avoid potential crashes. svn path=/trunk/; revision=23080
Diffstat (limited to 'asn1/x411')
-rw-r--r--asn1/x411/packet-x411-template.c6
-rw-r--r--asn1/x411/x411.cnf6
2 files changed, 9 insertions, 3 deletions
diff --git a/asn1/x411/packet-x411-template.c b/asn1/x411/packet-x411-template.c
index 5bc3bf490d..ace11adfe4 100644
--- a/asn1/x411/packet-x411-template.c
+++ b/asn1/x411/packet-x411-template.c
@@ -66,14 +66,14 @@ int proto_x411 = -1;
static struct SESSION_DATA_STRUCTURE* session = NULL;
static int extension_id = -1; /* integer extension id */
-static const char *object_identifier_id; /* extensions identifier */
-static const char *content_type_id; /* content type identifier */
+static const char *object_identifier_id = NULL; /* extensions identifier */
+static const char *content_type_id = NULL; /* content type identifier */
#define MAX_ORA_STR_LEN 256
static char *oraddress = NULL;
static gboolean doing_address=FALSE;
static gboolean doing_subjectid=FALSE;
-static proto_item *address_item;
+static proto_item *address_item = NULL;
static proto_tree *top_tree=NULL;
diff --git a/asn1/x411/x411.cnf b/asn1/x411/x411.cnf
index bccea1ec6e..04ae824d60 100644
--- a/asn1/x411/x411.cnf
+++ b/asn1/x411/x411.cnf
@@ -648,6 +648,12 @@ AddrTeletexString TeletexPersonalName/surname TeletexPersonalName/given-name Tel
doing_address = FALSE;
+#.FN_BODY MessageIdentifier
+
+ address_item = NULL;
+
+ %(DEFAULT_BODY)s
+
#.FN_BODY GlobalDomainIdentifier
oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';