aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2005-04-22 21:17:13 +0000
committerGerald Combs <gerald@wireshark.org>2005-04-22 21:17:13 +0000
commit082651c83efa53b9766460538603f101c643568e (patch)
treef8f62a7beb847bddda04888f1e98f4140a5e1ae1 /asn1
parente8730eab95fce56dd66b6fb7ceab6983058dca67 (diff)
Define a maximum OID string length, and use it in a lot of places. Fixes a
buffer overflow found while fuzz testing. svn path=/trunk/; revision=14169
Diffstat (limited to 'asn1')
-rw-r--r--asn1/cmip/packet-cmip-template.c6
-rw-r--r--asn1/cms/packet-cms-template.c2
-rw-r--r--asn1/ess/packet-ess-template.c2
-rw-r--r--asn1/ocsp/packet-ocsp-template.c2
-rw-r--r--asn1/pkix1explicit/packet-pkix1explicit-template.c2
-rw-r--r--asn1/pkixcmp/packet-cmp-template.c2
-rw-r--r--asn1/pkixcrmf/packet-crmf-template.c2
-rw-r--r--asn1/pkixqualified/packet-pkixqualified-template.c2
-rw-r--r--asn1/x509af/packet-x509af-template.c4
-rw-r--r--asn1/x509ce/packet-x509ce-template.c2
-rw-r--r--asn1/x509if/packet-x509if-template.c2
11 files changed, 14 insertions, 14 deletions
diff --git a/asn1/cmip/packet-cmip-template.c b/asn1/cmip/packet-cmip-template.c
index 968636094b..19228ddbfe 100644
--- a/asn1/cmip/packet-cmip-template.c
+++ b/asn1/cmip/packet-cmip-template.c
@@ -69,14 +69,14 @@ static int opcode_type;
static int attributeform;
#define ATTRIBUTE_LOCAL_FORM 0
#define ATTRIBUTE_GLOBAL_FORM 1
-static char attribute_identifier_id[64]; /*64 chars should be long enough? */
+static char attribute_identifier_id[BER_MAX_OID_STR_LEN];
-static char object_identifier_id[64]; /*64 chars should be long enough? */
+static char object_identifier_id[BER_MAX_OID_STR_LEN];
static int objectclassform;
#define OBJECTCLASS_LOCAL_FORM 0
#define OBJECTCLASS_GLOBAL_FORM 1
-static char objectclass_identifier_id[64]; /*64 chars should be long enough? */
+static char objectclass_identifier_id[BER_MAX_OID_STR_LEN];
#include "packet-cmip-fn.c"
diff --git a/asn1/cms/packet-cms-template.c b/asn1/cms/packet-cms-template.c
index 293ac94460..644ea2b82d 100644
--- a/asn1/cms/packet-cms-template.c
+++ b/asn1/cms/packet-cms-template.c
@@ -54,7 +54,7 @@ static int hf_cms_ci_contentType = -1;
static int dissect_cms_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) ; /* XXX kill a compiler warning until asn2eth stops generating these silly wrappers */
-static char object_identifier_id[64]; /*64 chars should be long enough? */
+static char object_identifier_id[BER_MAX_OID_STR_LEN];
#include "packet-cms-fn.c"
diff --git a/asn1/ess/packet-ess-template.c b/asn1/ess/packet-ess-template.c
index 1d0edcf3be..2d80ce1a9e 100644
--- a/asn1/ess/packet-ess-template.c
+++ b/asn1/ess/packet-ess-template.c
@@ -51,7 +51,7 @@ static int hf_ess_SecurityCategory_type_OID = -1;
/* Initialize the subtree pointers */
#include "packet-ess-ett.c"
-static char object_identifier_id[64]; /*64 chars should be long enough? */
+static char object_identifier_id[BER_MAX_OID_STR_LEN];
#include "packet-ess-fn.c"
diff --git a/asn1/ocsp/packet-ocsp-template.c b/asn1/ocsp/packet-ocsp-template.c
index d509d4749a..585f908480 100644
--- a/asn1/ocsp/packet-ocsp-template.c
+++ b/asn1/ocsp/packet-ocsp-template.c
@@ -53,7 +53,7 @@ static int hf_ocsp_responseType_id = -1;
static gint ett_ocsp = -1;
#include "packet-ocsp-ett.c"
-static char responseType_id[64]; /*64 chars should be long enough? */
+static char responseType_id[BER_MAX_OID_STR_LEN];
#include "packet-ocsp-fn.c"
diff --git a/asn1/pkix1explicit/packet-pkix1explicit-template.c b/asn1/pkix1explicit/packet-pkix1explicit-template.c
index b657a55e45..5864278ea7 100644
--- a/asn1/pkix1explicit/packet-pkix1explicit-template.c
+++ b/asn1/pkix1explicit/packet-pkix1explicit-template.c
@@ -54,7 +54,7 @@ static int hf_pkix1explicit_object_identifier_id = -1;
#include "packet-pkix1explicit-ett.c"
-static char object_identifier_id[64]; /*64 chars should be long enough? */
+static char object_identifier_id[BER_MAX_OID_STR_LEN];
int
dissect_pkix1explicit_Certificate(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
diff --git a/asn1/pkixcmp/packet-cmp-template.c b/asn1/pkixcmp/packet-cmp-template.c
index adf2b06983..0591eb9318 100644
--- a/asn1/pkixcmp/packet-cmp-template.c
+++ b/asn1/pkixcmp/packet-cmp-template.c
@@ -53,7 +53,7 @@ static int hf_cmp_type_oid = -1;
static gint ett_cmp = -1;
#include "packet-cmp-ett.c"
-static char object_identifier_id[64]; /*64 chars should be long enough? */
+static char object_identifier_id[BER_MAX_OID_STR_LEN];
#include "packet-cmp-fn.c"
diff --git a/asn1/pkixcrmf/packet-crmf-template.c b/asn1/pkixcrmf/packet-crmf-template.c
index 5258037fb8..9947116009 100644
--- a/asn1/pkixcrmf/packet-crmf-template.c
+++ b/asn1/pkixcrmf/packet-crmf-template.c
@@ -52,7 +52,7 @@ static int hf_crmf_type_oid = -1;
/* Initialize the subtree pointers */
#include "packet-crmf-ett.c"
-static char object_identifier_id[64]; /*64 chars should be long enough? */
+static char object_identifier_id[BER_MAX_OID_STR_LEN];
#include "packet-crmf-fn.c"
diff --git a/asn1/pkixqualified/packet-pkixqualified-template.c b/asn1/pkixqualified/packet-pkixqualified-template.c
index ffebc23c72..8525ef4715 100644
--- a/asn1/pkixqualified/packet-pkixqualified-template.c
+++ b/asn1/pkixqualified/packet-pkixqualified-template.c
@@ -51,7 +51,7 @@ int proto_pkixqualified = -1;
/* Initialize the subtree pointers */
#include "packet-pkixqualified-ett.c"
-static char object_identifier_id[64]; /*64 chars should be long enough? */
+static char object_identifier_id[BER_MAX_OID_STR_LEN];
#include "packet-pkixqualified-fn.c"
diff --git a/asn1/x509af/packet-x509af-template.c b/asn1/x509af/packet-x509af-template.c
index a10c7205eb..1f8a2993b9 100644
--- a/asn1/x509af/packet-x509af-template.c
+++ b/asn1/x509af/packet-x509af-template.c
@@ -54,10 +54,10 @@ static int hf_x509af_extension_id = -1;
static gint ett_pkix_crl = -1;
#include "packet-x509af-ett.c"
-static char algorithm_id[64]; /*64 chars should be long enough? */
+static char algorithm_id[BER_MAX_OID_STR_LEN];
-static char extension_id[64]; /*64 chars should be long enough? */
+static char extension_id[BER_MAX_OID_STR_LEN];
#include "packet-x509af-fn.c"
diff --git a/asn1/x509ce/packet-x509ce-template.c b/asn1/x509ce/packet-x509ce-template.c
index c725d15adb..05945be10f 100644
--- a/asn1/x509ce/packet-x509ce-template.c
+++ b/asn1/x509ce/packet-x509ce-template.c
@@ -55,7 +55,7 @@ static int hf_x509ce_IPAddress = -1;
/* Initialize the subtree pointers */
#include "packet-x509ce-ett.c"
-static char object_identifier_id[64]; /*64 chars should be long enough? */
+static char object_identifier_id[BER_MAX_OID_STR_LEN];
#include "packet-x509ce-fn.c"
diff --git a/asn1/x509if/packet-x509if-template.c b/asn1/x509if/packet-x509if-template.c
index ca63d592e2..06e2bd18c7 100644
--- a/asn1/x509if/packet-x509if-template.c
+++ b/asn1/x509if/packet-x509if-template.c
@@ -49,7 +49,7 @@ static int hf_x509if_object_identifier_id = -1;
/* Initialize the subtree pointers */
#include "packet-x509if-ett.c"
-static char object_identifier_id[64]; /*64 chars should be long enough? */
+static char object_identifier_id[BER_MAX_OID_STR_LEN];
#include "packet-x509if-fn.c"