summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-27 14:22:48 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-27 14:22:48 +0200
commitc0e29010f68a0ebe439f9bd78493799c60b7bfd3 (patch)
treede28c56983955b5bdbed61c7b1fe15bb666439c9 /src/vim9compile.c
parent8c7ad3631af570f68b2da2658cf966a9a19cb6c4 (diff)
downloadvim-git-c0e29010f68a0ebe439f9bd78493799c60b7bfd3.tar.gz
patch 8.2.1755: Vim9: crash when using invalid heredoc markerv8.2.1755
Problem: Vim9: crash when using invalid heredoc marker. (Dhiraj Mishra) Solution: Check for NULL list. (closes #7027) Fix comment character.
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 2d640155f..832d7d93e 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -4632,6 +4632,8 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
eap->getline = exarg_getline;
eap->cookie = cctx;
l = heredoc_get(eap, op + 3, FALSE);
+ if (l == NULL)
+ return NULL;
if (cctx->ctx_skip != SKIP_YES)
{