提交 1a78a33a 编写于 作者: F FdaSilvaYY 提交者: Rich Salz

remove magic number

Reviewed-by: NAndy Polyakov <appro@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4719)
上级 75331623
...@@ -68,6 +68,7 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, ...@@ -68,6 +68,7 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
unsigned char *p; unsigned char *p;
char oline[256], htmp[5]; char oline[256], htmp[5];
int i; int i;
switch (gen->type) { switch (gen->type) {
case GEN_OTHERNAME: case GEN_OTHERNAME:
if (!X509V3_add_value("othername", "<unsupported>", &ret)) if (!X509V3_add_value("othername", "<unsupported>", &ret))
...@@ -100,7 +101,7 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, ...@@ -100,7 +101,7 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
break; break;
case GEN_DIRNAME: 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)) || !X509V3_add_value("DirName", oline, &ret))
return NULL; return NULL;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册