diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-08-13 18:46:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-13 18:46:09 +0200 |
commit | d258ac8ed21b3a202212792688b237d0741f6844 (patch) | |
tree | 72e6157e1c7789f49cfdeb7f6629b66c38ebcf83 /src/nvim/memfile.c | |
parent | 3c8d063786285987876b4e5ca98b301037945868 (diff) | |
download | rneovim-d258ac8ed21b3a202212792688b237d0741f6844.tar.gz rneovim-d258ac8ed21b3a202212792688b237d0741f6844.tar.bz2 rneovim-d258ac8ed21b3a202212792688b237d0741f6844.zip |
io: more guards against NULL filename (#7159)
References ac055d677aa9
References #4370
Diffstat (limited to 'src/nvim/memfile.c')
-rw-r--r-- | src/nvim/memfile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/memfile.c b/src/nvim/memfile.c index 9429703620..4428dd42aa 100644 --- a/src/nvim/memfile.c +++ b/src/nvim/memfile.c @@ -895,6 +895,7 @@ static bool mf_do_open(memfile_T *mfp, char_u *fname, int flags) { // fname cannot be NameBuff, because it must have been allocated. mf_set_fnames(mfp, fname); + assert(mfp->mf_fname != NULL); /// Extra security check: When creating a swap file it really shouldn't /// exist yet. If there is a symbolic link, this is most likely an attack. |