- more coverity based fixes

This commit is contained in:
SoftCoder
2014-12-15 21:07:13 -08:00
parent 8210485a42
commit c945a5721d
5 changed files with 11 additions and 10 deletions

View File

@@ -170,7 +170,7 @@ int ftpStat(const char* path, ftpPathInfo_S *info)
gr = getgrgid(fileInfo.st_gid);
if(gr)
strncpy(info->group, gr->gr_name, sizeof(info->group));
strncpy(info->group, gr->gr_name, sizeof(info->group)-1);
else
snprintf(info->group, 20,"%04d", fileInfo.st_gid);