mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
UDP_Socket: Add missing limit checks for s, for client and broadcast addresses
This commit is contained in:
parent
6ae78da47e
commit
24aafa6dac
1 changed files with 3 additions and 3 deletions
|
@ -1044,7 +1044,7 @@ static boolean UDP_Socket(void)
|
|||
if (gaie == 0)
|
||||
{
|
||||
runp = ai;
|
||||
while (runp != NULL)
|
||||
while (runp != NULL && s < MAXNETNODES+1)
|
||||
{
|
||||
memcpy(&clientaddress[s], runp->ai_addr, runp->ai_addrlen);
|
||||
s++;
|
||||
|
@ -1064,7 +1064,7 @@ static boolean UDP_Socket(void)
|
|||
if (gaie == 0)
|
||||
{
|
||||
runp = ai;
|
||||
while (runp != NULL)
|
||||
while (runp != NULL && s < MAXNETNODES+1)
|
||||
{
|
||||
memcpy(&broadcastaddress[s], runp->ai_addr, runp->ai_addrlen);
|
||||
s++;
|
||||
|
@ -1087,7 +1087,7 @@ static boolean UDP_Socket(void)
|
|||
if (gaie == 0)
|
||||
{
|
||||
runp = ai;
|
||||
while (runp != NULL)
|
||||
while (runp != NULL && s < MAXNETNODES+1)
|
||||
{
|
||||
memcpy(&broadcastaddress[s], runp->ai_addr, runp->ai_addrlen);
|
||||
s++;
|
||||
|
|
Loading…
Reference in a new issue