Check return of DtlsMsgCreateFragBucket()

This commit is contained in:
Juliusz Sosinowicz 2022-09-16 12:13:12 +02:00
parent 4b3f6ada8a
commit 9ef10b5435

View File

@ -8427,8 +8427,13 @@ int DtlsMsgSet(DtlsMsg* msg, word32 seq, word16 epoch, const byte* data, byte ty
if (msg->fragBucketList == NULL) {
/* Clean list. Create first fragment. */
msg->fragBucketList = DtlsMsgCreateFragBucket(fragOffset, data, fragSz, heap);
msg->bytesReceived = fragSz;
msg->fragBucketListCount++;
if (msg->fragBucketList != NULL) {
msg->bytesReceived = fragSz;
msg->fragBucketListCount++;
}
else {
return MEMORY_ERROR;
}
}
else {
/* See if we can expand any existing bucket to fit this new data into */