mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
Added more bounds checking when saving a DTLS message fragment.
This commit is contained in:
@@ -2267,7 +2267,9 @@ void DtlsMsgListDelete(DtlsMsg* head, void* heap)
|
||||
void DtlsMsgSet(DtlsMsg* msg, word32 seq, const byte* data, byte type,
|
||||
word32 fragOffset, word32 fragSz)
|
||||
{
|
||||
if (msg != NULL && data != NULL && msg->fragSz <= msg->sz) {
|
||||
if (msg != NULL && data != NULL && msg->fragSz <= msg->sz &&
|
||||
fragOffset < msg->sz && (fragOffset + fragSz) <= msg->sz) {
|
||||
|
||||
msg->seq = seq;
|
||||
msg->type = type;
|
||||
msg->fragSz += fragSz;
|
||||
|
Reference in New Issue
Block a user