정수 오버플로우 방지
parent
e77c69287d
commit
759518f2f1
|
|
@ -444,6 +444,9 @@ int fdfs_copy_tracker_group(TrackerServerGroup *pDestTrackerGroup, \
|
|||
TrackerServerInfo *pDestServerEnd;
|
||||
|
||||
bytes = sizeof(TrackerServerInfo) * pSrcTrackerGroup->server_count;
|
||||
if(bytes <0){
|
||||
reutnr 0;
|
||||
}
|
||||
pDestTrackerGroup->servers = (TrackerServerInfo *)malloc(bytes);
|
||||
if (pDestTrackerGroup->servers == NULL)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue