* direntry.c (vfs_s_getlocalcopy): Fix potentially dangerous

strcpy().
This commit is contained in:
Pavel Roskin 2002-08-15 21:31:54 +00:00
parent 5a52a8bc85
commit 7f923cc9c0
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2002-08-15 Pavel Roskin <proski@gnu.org>
* direntry.c (vfs_s_getlocalcopy): Fix potentially dangerous
strcpy().
* extfs.c (s_readdir): Simplify.
* direntry.c (vfs_s_readdir): Use vfs_dirent.
* mcfs.c (mcfs_readdir): Likewise.

View File

@ -1027,7 +1027,7 @@ vfs_s_getlocalcopy (vfs *me, char *path)
struct vfs_s_inode *ino;
char buf[MC_MAXPATHLEN];
strcpy (buf, path);
strncpy (buf, path, MC_MAXPATHLEN);
ino = vfs_s_inode_from_path (me, path, FL_FOLLOW | FL_NONE);
if (!ino->localname)