diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-26 14:23:22 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-26 14:23:22 +0000 |
commit | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 (patch) | |
tree | 1e2011970b07e6d2e0161e134c33b94e7a940e7e /src/proto/userfunc.pro | |
parent | 71eb3ad5790ef3d16369e2fceb040980d75539cf (diff) | |
download | vim-git-9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04.tar.gz |
patch 8.2.3902: Vim9: double free with nested :def functionv8.2.3902
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid.
Diffstat (limited to 'src/proto/userfunc.pro')
-rw-r--r-- | src/proto/userfunc.pro | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/proto/userfunc.pro b/src/proto/userfunc.pro index 0320f09d3..311cee2e1 100644 --- a/src/proto/userfunc.pro +++ b/src/proto/userfunc.pro @@ -38,7 +38,7 @@ char_u *untrans_function_name(char_u *name); char_u *get_scriptlocal_funcname(char_u *funcname); char_u *save_function_name(char_u **name, int *is_global, int skip, int flags, funcdict_T *fudi); void list_functions(regmatch_T *regmatch); -ufunc_T *define_function(exarg_T *eap, char_u *name_arg); +ufunc_T *define_function(exarg_T *eap, char_u *name_arg, char_u **line_to_free); void ex_function(exarg_T *eap); void ex_defcompile(exarg_T *eap); int eval_fname_script(char_u *p); |