정수 오버플로우 방지
parent
9bc679591e
commit
e69e2cdd97
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue