0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.0.0440: crash when using mkdir() with "R" flag in compiled function

Problem:    Crash when using mkdir() with "R" flag in compiled function.
Solution:   Reserve a variable for deferred function calls.  Handle more than
            one argument.
This commit is contained in:
Bram Moolenaar
2022-09-11 11:49:22 +01:00
parent 88b79cb7d4
commit f5fec05c7f
4 changed files with 35 additions and 48 deletions

View File

@@ -833,10 +833,11 @@ compile_call(
}
}
if (STRCMP(name, "writefile") == 0 && argcount > 2)
if ((STRCMP(name, "writefile") == 0 && argcount > 2)
|| (STRCMP(name, "mkdir") == 0 && argcount > 1))
{
// May have the "D" flag, reserve a variable for a deferred
// function call.
// May have the "D" or "R" flag, reserve a variable for a
// deferred function call.
if (get_defer_var_idx(cctx) == 0)
idx = -1;
}