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:
parent
b67eea7c13
commit
dbb69aaae8
@ -128,7 +128,7 @@ void *handleConnections(void *arguments)
|
||||
int messageSize;
|
||||
|
||||
messageSize = listenToClient(client_fd, buffer);
|
||||
if (messageSize <= 0)
|
||||
if (messageSize <= 0 || messageSize > 256)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user