From 4b68cb41d1c07ffd21a0fa5da811b1f0d45d7b16 Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Sun, 5 Jun 2016 14:13:33 +0200 Subject: [PATCH] Specify array sizes Reviewed-by: Rich Salz GH: #1172 --- crypto/ct/ct_locl.h | 2 +- crypto/ct/ct_x509v3.c | 2 +- crypto/x509v3/ext_dat.h | 4 ++-- crypto/x509v3/v3_alt.c | 2 +- crypto/x509v3/v3_ia5.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crypto/ct/ct_locl.h b/crypto/ct/ct_locl.h index e3ef4b7494..1180455e1a 100644 --- a/crypto/ct/ct_locl.h +++ b/crypto/ct/ct_locl.h @@ -168,4 +168,4 @@ __owur int SCT_signature_is_complete(const SCT *sct); /* * Handlers for Certificate Transparency X509v3/OCSP extensions */ -extern const X509V3_EXT_METHOD v3_ct_scts[]; +extern const X509V3_EXT_METHOD v3_ct_scts[3]; diff --git a/crypto/ct/ct_x509v3.c b/crypto/ct/ct_x509v3.c index 4298e1eddb..805ada088a 100644 --- a/crypto/ct/ct_x509v3.c +++ b/crypto/ct/ct_x509v3.c @@ -31,7 +31,7 @@ static int i2r_SCT_LIST(X509V3_EXT_METHOD *method, STACK_OF(SCT) *sct_list, } /* Handlers for X509v3/OCSP Certificate Transparency extensions */ -const X509V3_EXT_METHOD v3_ct_scts[] = { +const X509V3_EXT_METHOD v3_ct_scts[3] = { /* X509v3 extension in certificates that contains SCTs */ { NID_ct_precert_scts, 0, NULL, NULL, (X509V3_EXT_FREE)SCT_LIST_free, diff --git a/crypto/x509v3/ext_dat.h b/crypto/x509v3/ext_dat.h index 332cb87474..c9ede960e1 100644 --- a/crypto/x509v3/ext_dat.h +++ b/crypto/x509v3/ext_dat.h @@ -11,7 +11,7 @@ int name_cmp(const char *name, const char *cmp); extern const X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku; extern const X509V3_EXT_METHOD v3_pkey_usage_period, v3_sxnet, v3_info, v3_sinfo; -extern const X509V3_EXT_METHOD v3_ns_ia5_list[], v3_alt[], v3_skey_id, v3_akey_id; +extern const X509V3_EXT_METHOD v3_ns_ia5_list[8], v3_alt[3], v3_skey_id, v3_akey_id; extern const X509V3_EXT_METHOD v3_crl_num, v3_crl_reason, v3_crl_invdate; extern const X509V3_EXT_METHOD v3_delta_crl, v3_cpols, v3_crld, v3_freshest_crl; extern const X509V3_EXT_METHOD v3_ocsp_nonce, v3_ocsp_accresp, v3_ocsp_acutoff; @@ -20,5 +20,5 @@ extern const X509V3_EXT_METHOD v3_crl_hold, v3_pci; extern const X509V3_EXT_METHOD v3_policy_mappings, v3_policy_constraints; extern const X509V3_EXT_METHOD v3_name_constraints, v3_inhibit_anyp, v3_idp; extern const X509V3_EXT_METHOD v3_addr, v3_asid; -extern const X509V3_EXT_METHOD v3_ct_scts[]; +extern const X509V3_EXT_METHOD v3_ct_scts[3]; extern const X509V3_EXT_METHOD v3_tls_feature; diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c index 05dfe36a33..7778029c89 100644 --- a/crypto/x509v3/v3_alt.c +++ b/crypto/x509v3/v3_alt.c @@ -24,7 +24,7 @@ static int copy_issuer(X509V3_CTX *ctx, GENERAL_NAMES *gens); static int do_othername(GENERAL_NAME *gen, char *value, X509V3_CTX *ctx); static int do_dirname(GENERAL_NAME *gen, char *value, X509V3_CTX *ctx); -const X509V3_EXT_METHOD v3_alt[] = { +const X509V3_EXT_METHOD v3_alt[3] = { {NID_subject_alt_name, 0, ASN1_ITEM_ref(GENERAL_NAMES), 0, 0, 0, 0, 0, 0, diff --git a/crypto/x509v3/v3_ia5.c b/crypto/x509v3/v3_ia5.c index 5e230df7d0..c1170d4616 100644 --- a/crypto/x509v3/v3_ia5.c +++ b/crypto/x509v3/v3_ia5.c @@ -14,7 +14,7 @@ #include #include "ext_dat.h" -const X509V3_EXT_METHOD v3_ns_ia5_list[] = { +const X509V3_EXT_METHOD v3_ns_ia5_list[8] = { EXT_IA5STRING(NID_netscape_base_url), EXT_IA5STRING(NID_netscape_revocation_url), EXT_IA5STRING(NID_netscape_ca_revocation_url), -- 2.25.1