diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-08-29 10:06:35 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-09-05 08:04:15 +0200 |
commit | db17d2c0fa2f82edc486ec7954e174404a115036 (patch) | |
tree | a41fb16189a0f17b591e694eca4482452828e471 /test/functional/api/vim_spec.lua | |
parent | 9fe8e3cb2f357ea38d53b5d83b3ea0ebf98be58a (diff) | |
download | rneovim-db17d2c0fa2f82edc486ec7954e174404a115036.tar.gz rneovim-db17d2c0fa2f82edc486ec7954e174404a115036.tar.bz2 rneovim-db17d2c0fa2f82edc486ec7954e174404a115036.zip |
API: Avoid overrun when formatting error-message
msgpack_rpc_to_object (called by handle_request .. msgpack_rpc_to_array)
always NUL-terminates API Strings.
But handle_request .. msgpack_rpc_get_handler_for operates on a raw
msgpack_object, before preparation.
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index ae8a8488d4..8d3f083b3e 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -337,7 +337,7 @@ describe('API', function() eq(1, funcs.exists('g:lua')) meths.del_var('lua') eq(0, funcs.exists('g:lua')) - eq({false, 'Key does not exist: lua'}, meth_pcall(meths.del_var, 'lua')) + eq({false, "Key not found: lua"}, meth_pcall(meths.del_var, 'lua')) meths.set_var('lua', 1) command('lockvar lua') eq({false, 'Key is locked: lua'}, meth_pcall(meths.del_var, 'lua')) @@ -948,7 +948,7 @@ describe('API', function() } local status, err = pcall(meths.call_atomic, req) eq(false, status) - ok(err:match(' All items in calls array must be arrays of size 2') ~= nil) + ok(err:match('Items in calls array must be arrays of size 2') ~= nil) -- call before was done, but not after eq(1, meths.get_var('avar')) @@ -958,7 +958,7 @@ describe('API', function() } status, err = pcall(meths.call_atomic, req) eq(false, status) - ok(err:match('All items in calls array must be arrays') ~= nil) + ok(err:match('Items in calls array must be arrays') ~= nil) eq({2,3}, meths.get_var('bvar')) req = { |