Security issue fixed. Issue 4 fixed.
This commit is contained in:
parent
2682f81b20
commit
8f4732acbc
|
@ -161,6 +161,10 @@ namespace UDPT
|
||||||
|
|
||||||
msg_sz = 4 + 4 + 1 + msg.length();
|
msg_sz = 4 + 4 + 1 + msg.length();
|
||||||
|
|
||||||
|
// test against overflow message. resolves issue 4.
|
||||||
|
if (msg_sz > 1024)
|
||||||
|
return -1;
|
||||||
|
|
||||||
memcpy(buff, &error, 8);
|
memcpy(buff, &error, 8);
|
||||||
for (i = 8;i <= msg_sz;i++)
|
for (i = 8;i <= msg_sz;i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue