diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-20 15:02:42 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-20 15:02:42 +0200 |
commit | 66250c932e8a0e3c43e7c7c7b1dbede040b9c508 (patch) | |
tree | 485324d99b96692841c3f44ad0f76b4c67be4d49 /src/ex_docmd.c | |
parent | 93ad14710bdf77591f927a2b244bba6a8cbc7706 (diff) | |
download | vim-git-66250c932e8a0e3c43e7c7c7b1dbede040b9c508.tar.gz |
patch 8.2.1491: Vim9: crash when compiling heredoc lines start with commentv8.2.1491
Problem: Vim9: crash when compiling heredoc lines start with comment.
Solution: Skip over NULL pointers. Do not remove comment and empty lines
when fetching function lines. (closes #6743)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 612d478e9..4a6da4da0 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -612,7 +612,7 @@ do_cmdline_cmd(char_u *cmd) int do_cmdline( char_u *cmdline, - char_u *(*fgetline)(int, void *, int, int), + char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie, // argument for fgetline() int flags) { @@ -638,7 +638,7 @@ do_cmdline( msglist_T *private_msg_list; // "fgetline" and "cookie" passed to do_one_cmd() - char_u *(*cmd_getline)(int, void *, int, int); + char_u *(*cmd_getline)(int, void *, int, getline_opt_T); void *cmd_cookie; struct loop_cookie cmd_loop_cookie; void *real_cookie; @@ -1482,9 +1482,9 @@ free_cmdlines(garray_T *gap) */ int getline_equal( - char_u *(*fgetline)(int, void *, int, int), + char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie UNUSED, // argument for fgetline() - char_u *(*func)(int, void *, int, int)) + char_u *(*func)(int, void *, int, getline_opt_T)) { #ifdef FEAT_EVAL char_u *(*gp)(int, void *, int, int); @@ -1512,7 +1512,7 @@ getline_equal( */ void * getline_cookie( - char_u *(*fgetline)(int, void *, int, int) UNUSED, + char_u *(*fgetline)(int, void *, int, getline_opt_T) UNUSED, void *cookie) // argument for fgetline() { #ifdef FEAT_EVAL @@ -1541,7 +1541,7 @@ getline_cookie( */ char_u * getline_peek( - char_u *(*fgetline)(int, void *, int, int) UNUSED, + char_u *(*fgetline)(int, void *, int, getline_opt_T) UNUSED, void *cookie) // argument for fgetline() { char_u *(*gp)(int, void *, int, int); |