mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
Replace vim_strncpy calls: os_unix.c
This commit is contained in:

committed by
Justin M. Keyes

parent
c37d4c5d12
commit
d6e9b3caad
@@ -409,9 +409,9 @@ int len /* buffer size, only used when name gets longer */
|
|||||||
struct stat st2;
|
struct stat st2;
|
||||||
|
|
||||||
/* Verify the inode is equal. */
|
/* Verify the inode is equal. */
|
||||||
vim_strncpy(newname, name, MAXPATHL);
|
STRLCPY(newname, name, MAXPATHL + 1);
|
||||||
vim_strncpy(newname + (tail - name), (char_u *)dp->d_name,
|
STRLCPY(newname + (tail - name), dp->d_name,
|
||||||
MAXPATHL - (tail - name));
|
MAXPATHL - (tail - name) + 1);
|
||||||
if (lstat((char *)newname, &st2) >= 0
|
if (lstat((char *)newname, &st2) >= 0
|
||||||
&& st.st_ino == st2.st_ino
|
&& st.st_ino == st2.st_ino
|
||||||
&& st.st_dev == st2.st_dev) {
|
&& st.st_dev == st2.st_dev) {
|
||||||
|
Reference in New Issue
Block a user