Skip to content

Commit

Permalink
Fix Null Pointer Dereference in TCP Packet Handling
Browse files Browse the repository at this point in the history
  • Loading branch information
BoB13-Matter committed Dec 6, 2024
1 parent 9e671ad commit 404db44
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transport/raw/TCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ CHIP_ERROR TCPBase::ProcessReceivedBuffer(Inet::TCPEndPoint * endPoint, const Pe
return CHIP_NO_ERROR;
}
state->mReceived.Consume(kPacketSizeBytes);
VerifyOrReturnError(!state->mReceived.IsNull(), CHIP_ERROR_MESSAGE_INCOMPLETE);
ReturnErrorOnFailure(ProcessSingleMessage(peerAddress, state, messageSize));
}

Expand Down

0 comments on commit 404db44

Please sign in to comment.