From: Kurt Roeckx Date: Fri, 27 May 2016 19:10:05 +0000 (+0200) Subject: Specifiy size of arrays X-Git-Tag: OpenSSL_1_1_0-pre6~557 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=578b55144121b83a96e780f241f614759c75d1b5 Specifiy size of arrays Reviewed-by: Rich Salz GH: #1139 --- diff --git a/crypto/dsa/dsa_ameth.c b/crypto/dsa/dsa_ameth.c index a53247c074..b30368e32e 100644 --- a/crypto/dsa/dsa_ameth.c +++ b/crypto/dsa/dsa_ameth.c @@ -509,7 +509,7 @@ static int dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) /* NB these are sorted in pkey_id order, lowest first */ -const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[] = { +const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[5] = { { EVP_PKEY_DSA2, diff --git a/crypto/include/internal/asn1_int.h b/crypto/include/internal/asn1_int.h index 4524fe2166..1bd1fab82f 100644 --- a/crypto/include/internal/asn1_int.h +++ b/crypto/include/internal/asn1_int.h @@ -59,10 +59,10 @@ DEFINE_STACK_OF_CONST(EVP_PKEY_ASN1_METHOD) extern const EVP_PKEY_ASN1_METHOD cmac_asn1_meth; extern const EVP_PKEY_ASN1_METHOD dh_asn1_meth; extern const EVP_PKEY_ASN1_METHOD dhx_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[]; +extern const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[5]; extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth; extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[]; +extern const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[2]; /* * These are used internally in the ASN1_OBJECT to keep track of whether the diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c index 4f9c056514..d55cf330b9 100644 --- a/crypto/rsa/rsa_ameth.c +++ b/crypto/rsa/rsa_ameth.c @@ -827,7 +827,7 @@ static int rsa_cms_encrypt(CMS_RecipientInfo *ri) } #endif -const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[] = { +const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[2] = { { EVP_PKEY_RSA, EVP_PKEY_RSA,