mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
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.
This commit is contained in:
@@ -309,7 +309,7 @@ describe('api/buf', function()
|
||||
eq(1, funcs.exists('b:lua'))
|
||||
curbufmeths.del_var('lua')
|
||||
eq(0, funcs.exists('b:lua'))
|
||||
eq({false, 'Key does not exist: lua'}, meth_pcall(curbufmeths.del_var, 'lua'))
|
||||
eq({false, 'Key not found: lua'}, meth_pcall(curbufmeths.del_var, 'lua'))
|
||||
curbufmeths.set_var('lua', 1)
|
||||
command('lockvar b:lua')
|
||||
eq({false, 'Key is locked: lua'}, meth_pcall(curbufmeths.del_var, 'lua'))
|
||||
|
||||
Reference in New Issue
Block a user