diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-03-23 20:09:36 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-04-04 18:11:48 +0200 |
commit | 3d6831a30a6248b44be86e3b149eaaf4bb05c0a4 (patch) | |
tree | e30d21336ed332f8d36be172e9883d3b0fbff180 /test/functional/core/job_spec.lua | |
parent | 8e496b9dfd5b644f06536afea63e3088b9d83cf8 (diff) | |
download | rneovim-3d6831a30a6248b44be86e3b149eaaf4bb05c0a4.tar.gz rneovim-3d6831a30a6248b44be86e3b149eaaf4bb05c0a4.tar.bz2 rneovim-3d6831a30a6248b44be86e3b149eaaf4bb05c0a4.zip |
api: fix use-after-free in nvim_chan_send
Diffstat (limited to 'test/functional/core/job_spec.lua')
-rw-r--r-- | test/functional/core/job_spec.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index b59d87eb12..9de0d08e79 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -963,8 +963,10 @@ describe('jobs', function() return rv end + local j local function send(str) - nvim('command', 'call jobsend(j, "'..str..'")') + -- check no nvim_chan_free double free with pty job (#14198) + meths.chan_send(j, str) end before_each(function() @@ -979,6 +981,7 @@ describe('jobs', function() nvim('command', 'let g:job_opts.pty = 1') nvim('command', 'let exec = [expand("<cfile>:p")]') nvim('command', "let j = jobstart(exec, g:job_opts)") + j = eval'j' eq('tty ready', next_chunk()) end) |