1
0
mirror of https://github.com/thiagoralves/OpenPLC.git synced 2025-05-09 00:21:52 +08:00

Protection against buffer overflow

This commit is contained in:
Thiago Alves 2016-03-14 16:21:13 -05:00
parent b67eea7c13
commit dbb69aaae8

View File

@ -128,7 +128,7 @@ void *handleConnections(void *arguments)
int messageSize;
messageSize = listenToClient(client_fd, buffer);
if (messageSize <= 0)
if (messageSize <= 0 || messageSize > 256)
{
break;
}