정수 오버플로우 방지

pull/540/head
root 2021-11-26 18:06:56 +00:00
parent 9bc679591e
commit e69e2cdd97
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ int fdfs_copy_tracker_group(TrackerServerGroup *pDestTrackerGroup, \
bytes = sizeof(TrackerServerInfo) * pSrcTrackerGroup->server_count; bytes = sizeof(TrackerServerInfo) * pSrcTrackerGroup->server_count;
if(bytes <0){ if(bytes <0){
reutnr 0; return 0;
} }
pDestTrackerGroup->servers = (TrackerServerInfo *)malloc(bytes); pDestTrackerGroup->servers = (TrackerServerInfo *)malloc(bytes);
if (pDestTrackerGroup->servers == NULL) if (pDestTrackerGroup->servers == NULL)