forked from wolfSSL/wolfssl
don't allow zero length asn names in certs
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
AC_INIT([cyassl],[2.0.8],[http://www.yassl.com])
|
AC_INIT([cyassl],[2.0.9],[http://www.yassl.com])
|
||||||
|
|
||||||
AC_CONFIG_AUX_DIR(config)
|
AC_CONFIG_AUX_DIR(config)
|
||||||
|
|
||||||
|
@ -1300,6 +1300,10 @@ static int GetName(DecodedCert* cert, int nameType)
|
|||||||
cert->maxIdx) < 0)
|
cert->maxIdx) < 0)
|
||||||
return ASN_PARSE_E;
|
return ASN_PARSE_E;
|
||||||
|
|
||||||
|
if (strLen == 0) {
|
||||||
|
CYASSL_MSG("Zero length name");
|
||||||
|
return ASN_PARSE_E;
|
||||||
|
}
|
||||||
if (strLen > (int)(ASN_NAME_MAX - idx))
|
if (strLen > (int)(ASN_NAME_MAX - idx))
|
||||||
return ASN_PARSE_E;
|
return ASN_PARSE_E;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user