mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
sanity check before reading policy constraint
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user