数组溢出:
error: Array 'g_sAccepChannelBusiness[200]' accessed at index 254, which is out of bounds.
1.
#define
MAX_TCPSERVERCONNECT
200
#define
MAX_TCPCLIENTCONNECT
200
struct
SChannelBusiness
g_sAccepChannelBusiness[MAX_TCPSERVERCONNECT];
int
u4ip = i;
if ((g_sParkingInfo.au4Ip[u4ip & 0xff] & 0xff) != 0)
{
if (iPrintfFlag == 1)
_printf("FD_SET gAccept_fd[%03d] socket=%05d %s CAN hearbeat YES ", i, ifdTmp, (char*)(inet_ntoa(g_sAccepChannelBusiness[i].gAccept_addr.sin_addr)));
}
修改:
#define
MAX_TCPSERVERCONNECT
255
#define
MAX_TCPCLIENTCONNECT
255 |