1
0
forked from aniani/vim

patch 8.2.1789: Vim9: crash with invalid list constant

Problem:    Vim9: crash with invalid list constant. (Dhiraj Mishra)
Solution:   Return FAIL when compiling the list fails. (closes #7066)
This commit is contained in:
Bram Moolenaar
2020-10-03 13:41:53 +02:00
parent 016faaa1b2
commit c1f0066b64
4 changed files with 18 additions and 1 deletions

View File

@@ -2549,7 +2549,7 @@ compile_list(char_u **arg, cctx_T *cctx)
break;
}
if (compile_expr0(&p, cctx) == FAIL)
break;
return FAIL;
++count;
if (*p == ',')
{
@@ -3333,7 +3333,10 @@ compile_subscript(
*arg = p + 1;
if (may_get_next_line(*arg, arg, cctx) == FAIL)
{
emsg(_(e_missing_name_after_dot));
return FAIL;
}
// dictionary member: dict.name
p = *arg;
if (eval_isdictc(*p))