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
committerGitHub <noreply@github.com>2017-08-13 18:46:09 +0200
commitd258ac8ed21b3a202212792688b237d0741f6844 (patch)
tree72e6157e1c7789f49cfdeb7f6629b66c38ebcf83 /src/nvim/memfile.c
parent3c8d063786285987876b4e5ca98b301037945868 (diff)
downloadrneovim-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.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.