aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-04-04 22:41:01 +0200
committerGitHub <noreply@github.com>2021-04-04 22:41:01 +0200
commit160c9fd126220d6e79204f637ac4bcd999527d4b (patch)
tree1039964b70d2b87f7512b95c5c755aab1d7994b8 /test/functional
parent0f187700ab1437e949f03d6915df7c76f8287304 (diff)
parent3d6831a30a6248b44be86e3b149eaaf4bb05c0a4 (diff)
downloadrneovim-160c9fd126220d6e79204f637ac4bcd999527d4b.tar.gz
rneovim-160c9fd126220d6e79204f637ac4bcd999527d4b.tar.bz2
rneovim-160c9fd126220d6e79204f637ac4bcd999527d4b.zip
Merge pull request #14199 from bfredl/chansend2
api: fix use-after-free in nvim_chan_send
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/core/job_spec.lua5
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)