aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-01-26 21:33:53 +0100
committerGitHub <noreply@github.com>2022-01-26 21:33:53 +0100
commit17e2938b100070d91bd956c8734760ca16f6d3f2 (patch)
tree8c031c6f12c3b30bc18ea6dc62b41b2c281e0c69 /src/nvim/path.c
parent20482a2b83b9ea56ce226239ebb6c0fe7819c6f1 (diff)
parentdda1c8edda86a50d802f777e5ba2379f7ccd6ae8 (diff)
downloadrneovim-17e2938b100070d91bd956c8734760ca16f6d3f2.tar.gz
rneovim-17e2938b100070d91bd956c8734760ca16f6d3f2.tar.bz2
rneovim-17e2938b100070d91bd956c8734760ca16f6d3f2.zip
Merge pull request #17132 from zeertzjq/vim-8.2.3611
vim-patch:8.2.{3494,3611,3613}: two Visual mode crash fixes
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 674d67e21a..8b110d0ded 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -1682,6 +1682,10 @@ char_u *find_file_name_in_path(char_u *ptr, size_t len, int options, long count,
char_u *file_name;
char_u *tofree = NULL;
+ if (len == 0) {
+ return NULL;
+ }
+
if ((options & FNAME_INCL) && *curbuf->b_p_inex != NUL) {
tofree = (char_u *)eval_includeexpr((char *)ptr, len);
if (tofree != NULL) {