mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Merge pull request #7536 from gasbytes/buffer_overflows_fix
added check that checks if the SEQ's length is > than the buff's length
This commit is contained in:
@ -160,6 +160,10 @@ static int DataToDerBuffer(const unsigned char* buff, word32 len, int format,
|
||||
else {
|
||||
ret = ASN_PARSE_E;
|
||||
}
|
||||
|
||||
if (info->consumed > (int)len) {
|
||||
ret = ASN_PARSE_E;
|
||||
}
|
||||
if (ret == 0) {
|
||||
ret = AllocCopyDer(der, buff, (word32)info->consumed, type, heap);
|
||||
}
|
||||
|
Reference in New Issue
Block a user