check on certificate index when getting Name

This commit is contained in:
Jacob Barthelmeh 2018-03-01 10:03:20 -07:00
parent e80e82a89b
commit ae21c03d69

View File

@ -4102,6 +4102,10 @@ static int GetName(DecodedCert* cert, int nameType)
hash = cert->subjectHash;
}
if (cert->srcIdx >= cert->maxIdx) {
return BUFFER_E;
}
if (cert->source[cert->srcIdx] == ASN_OBJECT_ID) {
WOLFSSL_MSG("Trying optional prefix...");