aboutsummaryrefslogtreecommitdiff
path: root/crypto/x509v3
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2017-11-06 18:32:33 +0100
committerRich Salz <rsalz@openssl.org>2017-11-13 07:52:35 -0500
commit1a78a33aed6d182bf26a3e839341b9ea38dbcaa3 (patch)
treef874474a0bc268e4e0039492bd3e9f1ca8adcfe4 /crypto/x509v3
parent753316232243ccbf86b96c1c51ffcb41651d9ad5 (diff)
downloadopenssl-1a78a33aed6d182bf26a3e839341b9ea38dbcaa3.zip
openssl-1a78a33aed6d182bf26a3e839341b9ea38dbcaa3.tar.gz
openssl-1a78a33aed6d182bf26a3e839341b9ea38dbcaa3.tar.bz2
remove magic number
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4719)
Diffstat (limited to 'crypto/x509v3')
-rw-r--r--crypto/x509v3/v3_alt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c
index 520235c..832e6d1 100644
--- a/crypto/x509v3/v3_alt.c
+++ b/crypto/x509v3/v3_alt.c
@@ -68,6 +68,7 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
unsigned char *p;
char oline[256], htmp[5];
int i;
+
switch (gen->type) {
case GEN_OTHERNAME:
if (!X509V3_add_value("othername", "<unsupported>", &ret))
@@ -100,7 +101,7 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
break;
case GEN_DIRNAME:
- if (X509_NAME_oneline(gen->d.dirn, oline, 256) == NULL
+ if (X509_NAME_oneline(gen->d.dirn, oline, sizeof(oline)) == NULL
|| !X509V3_add_value("DirName", oline, &ret))
return NULL;
break;