aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memfile.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-08-13 18:46:09 +0200
committerckelsel <ckelsel@hotmail.com>2017-08-14 07:45:50 +0800
commitc4e214a99cf0dfc53c1e903178c08fad9cb05354 (patch)
tree72e6157e1c7789f49cfdeb7f6629b66c38ebcf83 /src/nvim/memfile.c
parentd0cb175cab56da47fbd08e4b65ca02832a93bc38 (diff)
downloadrneovim-c4e214a99cf0dfc53c1e903178c08fad9cb05354.tar.gz
rneovim-c4e214a99cf0dfc53c1e903178c08fad9cb05354.tar.bz2
rneovim-c4e214a99cf0dfc53c1e903178c08fad9cb05354.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.c1
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.