drop unexpected udp data packet length

This commit is contained in:
Marco Scholl 2024-06-03 10:36:39 +02:00
parent 6eb7af74a0
commit 4f0e47f809
No known key found for this signature in database

View File

@ -517,11 +517,10 @@ int RP2040ArduinoPlatform::readBytesMultiCast(uint8_t* buffer, uint16_t maxLen)
if (len > maxLen)
{
print("udp buffer to small. was ");
print(maxLen);
print(", needed ");
println(len);
fatalError();
println("Unexpected UDP data packet length - drop packet");
for (size_t i = 0; i < len; i++)
_udp.read();
return 0;
}
_udp.read(buffer, len);