mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 03:07:29 +02:00
Maintenance: ASN.1
1. Reject as an error any ASN.1 length value that is multibyte of length 0.
This commit is contained in:
@ -179,7 +179,11 @@ WOLFSSL_LOCAL int GetLength_ex(const byte* input, word32* inOutIdx, int* len,
|
||||
}
|
||||
|
||||
b = input[idx++];
|
||||
if (b >= ASN_LONG_LENGTH) {
|
||||
if (b == ASN_LONG_LENGTH) {
|
||||
WOLFSSL_MSG("GetLength bad length length");
|
||||
return ASN_PARSE_E;
|
||||
}
|
||||
else if (b > ASN_LONG_LENGTH) {
|
||||
word32 bytes = b & 0x7F;
|
||||
|
||||
if ((idx + bytes) > maxIdx) { /* for reading bytes */
|
||||
|
Reference in New Issue
Block a user