mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
ParseCert: check index in DecodeSubtree before accessing tag
This commit is contained in:
@@ -15968,6 +15968,12 @@ static int DecodeSubtree(const byte* input, int sz, Base_entry** head,
|
||||
WOLFSSL_MSG("\tfail: should be a SEQUENCE");
|
||||
return ASN_PARSE_E;
|
||||
}
|
||||
|
||||
if (idx >= (word32)sz) {
|
||||
WOLFSSL_MSG("\tfail: expecting tag");
|
||||
return ASN_PARSE_E;
|
||||
}
|
||||
|
||||
nameIdx = idx;
|
||||
b = input[nameIdx++];
|
||||
|
||||
|
Reference in New Issue
Block a user