forked from wolfSSL/wolfssl
add sanity check for short read
This commit is contained in:
@@ -2618,6 +2618,10 @@ static int TLSX_CSR2_Parse(WOLFSSL* ssl, byte* input, word16 length,
|
|||||||
word16 size = 0;
|
word16 size = 0;
|
||||||
|
|
||||||
/* list size */
|
/* list size */
|
||||||
|
if (offset + OPAQUE16_LEN >= length) {
|
||||||
|
return BUFFER_E;
|
||||||
|
}
|
||||||
|
|
||||||
ato16(input + offset, &request_length);
|
ato16(input + offset, &request_length);
|
||||||
offset += OPAQUE16_LEN;
|
offset += OPAQUE16_LEN;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user