forked from wolfSSL/wolfssl
fix getlength patch
This commit is contained in:
@@ -287,7 +287,7 @@ static int GetLength(const byte* input, word32* inOutIdx, int* len,
|
|||||||
if (b >= ASN_LONG_LENGTH) {
|
if (b >= ASN_LONG_LENGTH) {
|
||||||
word32 bytes = b & 0x7F;
|
word32 bytes = b & 0x7F;
|
||||||
|
|
||||||
if ( (i+b) > maxIdx) { /* for reading bytes */
|
if ( (i+bytes) > maxIdx) { /* for reading bytes */
|
||||||
CYASSL_MSG("GetLength bad long length");
|
CYASSL_MSG("GetLength bad long length");
|
||||||
return BUFFER_E;
|
return BUFFER_E;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user