Security issue fixed. Issue 4 fixed.

This commit is contained in:
Naim A 2013-07-12 00:09:47 +03:00
parent 2682f81b20
commit 8f4732acbc

View file

@ -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++)
{ {