Merge pull request #4656 from JacobBarthelmeh/SanityChecks
sanity check before reading policy constraint
This commit is contained in:
commit
ea2245c4d1
@ -14837,6 +14837,10 @@ static int DecodePolicyConstraints(const byte* input, int sz, DecodedCert* cert)
|
||||
WOLFSSL_MSG("\tfail: skip value too big");
|
||||
return BUFFER_E;
|
||||
}
|
||||
if (idx >= (word32)sz) {
|
||||
WOLFSSL_MSG("\tfail: no policy const skip to read");
|
||||
return BUFFER_E;
|
||||
}
|
||||
cert->policyConstSkip = input[idx];
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user