normanr commented on a change in pull request #5108: URL: https://github.com/apache/incubator-nuttx/pull/5108#discussion_r776340258
########## File path: fs/binfs/fs_binfs.c ########## @@ -326,7 +326,7 @@ static int binfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) finfo("Entry %d: \"%s\"\n", index, name); dir->fd_dir.d_type = DTYPE_FILE; - strncpy(dir->fd_dir.d_name, name, NAME_MAX); + strlcpy(dir->fd_dir.d_name, name, NAME_MAX); Review comment: Should these all be `NAME_MAX + 1` because strlcpy copies at most `dsize-1` and `d_name` is defined as with a size of `NAME_MAX + 1`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org