Skip to content

Commit

Permalink
HOTFIX: correct UT issue with Dir Name Size
Browse files Browse the repository at this point in the history
  • Loading branch information
jphickey committed Apr 30, 2020
1 parent 2d369c2 commit 101862e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/os/vxworks/src/os-impl-dirs.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ int32 OS_DirRead_Impl(uint32 local_id, os_dirent_t *dirent)
return OS_ERROR;
}

strncpy(dirent->FileName, de->d_name, OS_MAX_PATH_LEN - 1);
dirent->FileName[OS_MAX_PATH_LEN - 1] = 0;
strncpy(dirent->FileName, de->d_name, sizeof(dirent->FileName)-1);
dirent->FileName[sizeof(dirent->FileName)-1] = 0;

return OS_SUCCESS;
} /* end OS_DirRead_Impl */
Expand Down

0 comments on commit 101862e

Please sign in to comment.