diff src/vim9compile.c @ 22413:66d1131a7eff v8.2.1755

patch 8.2.1755: Vim9: crash when using invalid heredoc marker Commit: https://github.com/vim/vim/commit/c0e29010f68a0ebe439f9bd78493799c60b7bfd3 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 27 14:22:48 2020 +0200 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 https://github.com/vim/vim/issues/7027) Fix comment character.
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Sep 2020 14:30:04 +0200
parents a9fb7efa31d6
children 1cefe1c013ac
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -4632,6 +4632,8 @@ compile_assignment(char_u *arg, exarg_T 
 	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)
 	{