0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.1.2280: crash when passing partial to substitute()

Problem:    Crash when passing partial to substitute().
Solution:   Take extra arguments into account. (closes #5186)
This commit is contained in:
Bram Moolenaar
2019-11-09 22:28:11 +01:00
parent dbd4316806
commit b0745b221d
6 changed files with 29 additions and 16 deletions

View File

@@ -1588,7 +1588,8 @@ call_func(
else if (fp != NULL)
{
if (funcexe->argv_func != NULL)
argcount = funcexe->argv_func(argcount, argvars,
// postponed filling in the arguments, do it now
argcount = funcexe->argv_func(argcount, argvars, argv_clear,
fp->uf_args.ga_len);
if (funcexe->basetv != NULL)