- a few bugfixes related to coverity scan

This commit is contained in:
SoftCoder
2014-12-15 19:44:26 -08:00
parent 9392aa0fca
commit 8210485a42
9 changed files with 17 additions and 9 deletions

View File

@@ -164,7 +164,7 @@ int ftpStat(const char* path, ftpPathInfo_S *info)
pw = getpwuid(fileInfo.st_uid);
if(pw)
strncpy(info->user, pw->pw_name, sizeof(info->user));
strncpy(info->user, pw->pw_name, sizeof(info->user)-1);
else
snprintf(info->user, 20,"%04d", fileInfo.st_uid);