add check on decode subtree return value

This commit is contained in:
Jacob Barthelmeh
2020-06-15 14:41:05 -06:00
parent baaf741c79
commit f020b0f24a

View File

@ -8408,7 +8408,10 @@ static int DecodeNameConstraints(const byte* input, int sz, DecodedCert* cert)
return ASN_PARSE_E;
}
DecodeSubtree(input + idx, length, subtree, cert->heap);
if (DecodeSubtree(input + idx, length, subtree, cert->heap) < 0) {
WOLFSSL_MSG("\terror parsing subtree");
return ASN_PARSE_E;
}
idx += length;
}