1
0
forked from aniani/vim

patch 8.0.1345: race condition between stat() and open() for viminfo

Problem:    Race condition between stat() and open() for the viminfo temp
            file. (Simon Ruderich)
Solution:   use open() with O_EXCL to atomically check if the file exists.
            Don't try using a temp file, renaming it will fail anyway.
This commit is contained in:
Bram Moolenaar
2017-11-26 16:50:41 +01:00
parent 2877d334ad
commit c41838aa01
2 changed files with 122 additions and 111 deletions

View File

@@ -771,6 +771,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1345,
/**/
1344,
/**/