diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-18 16:54:31 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-18 16:54:31 +0000 |
commit | 605ec91e5a7330d61be313637e495fa02a6dc264 (patch) | |
tree | f3d03e51a7bde96ecc0f05271909536b4973b42d /src/eval.c | |
parent | 60618c8f1a7ea55452837a446525272142286471 (diff) |
patch 8.2.3847: illegal memory access when using a lambda with an errorv8.2.3847
Problem: Illegal memory access when using a lambda with an error.
Solution: Avoid skipping over the NUL after a string.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index f45cd8e772..ecc242dcdd 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3871,12 +3871,15 @@ eval_lambda( ++*arg; ret = eval1(arg, rettv, evalarg); *arg = skipwhite_and_linebreak(*arg, evalarg); - if (**arg != ')') + if (**arg == ')') + { + ++*arg; + } + else { emsg(_(e_missing_closing_paren)); ret = FAIL; } - ++*arg; } if (ret != OK) return FAIL; |