Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Networking/W5500Ethernet/W5500Socket.cpp')
-rw-r--r--src/Networking/W5500Ethernet/W5500Socket.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Networking/W5500Ethernet/W5500Socket.cpp b/src/Networking/W5500Ethernet/W5500Socket.cpp
index 0f73b0ef..e5bc15c3 100644
--- a/src/Networking/W5500Ethernet/W5500Socket.cpp
+++ b/src/Networking/W5500Ethernet/W5500Socket.cpp
@@ -247,11 +247,11 @@ void W5500Socket::Poll() noexcept
}
}
-// Try to receive more incoming data from the socket. The mutex is alrady owned.
+// Try to receive more incoming data from the socket. The mutex is already owned.
void W5500Socket::ReceiveData() noexcept
{
const uint16_t len = getSn_RX_RSR(socketNum);
- if (len != 0)
+ if (len != 0 && len <= NetworkBuffer::bufferSize)
{
// debugPrintf("%u available\n", len);
NetworkBuffer * const lastBuffer = NetworkBuffer::FindLast(receivedData);