don't allow zero length asn names in certs

pull/1/head
toddouska 2012-03-01 16:46:24 -08:00
parent 815f3b8f75
commit 4c948e2ef7
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -1300,6 +1300,10 @@ static int GetName(DecodedCert* cert, int nameType)
cert->maxIdx) < 0)
return ASN_PARSE_E;
if (strLen == 0) {
CYASSL_MSG("Zero length name");
return ASN_PARSE_E;
}
if (strLen > (int)(ASN_NAME_MAX - idx))
return ASN_PARSE_E;