mirror of https://github.com/MidnightCommander/mc
* direntry.c (vfs_s_getlocalcopy): Fix potentially dangerous
strcpy().
This commit is contained in:
parent
5a52a8bc85
commit
7f923cc9c0
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue