From c0e29010f68a0ebe439f9bd78493799c60b7bfd3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 27 Sep 2020 14:22:48 +0200 Subject: patch 8.2.1755: Vim9: crash when using invalid heredoc marker Problem: Vim9: crash when using invalid heredoc marker. (Dhiraj Mishra) Solution: Check for NULL list. (closes #7027) Fix comment character. --- src/vim9compile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vim9compile.c') 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) { -- cgit v1.2.1