diff options
author | Daniel Bershatsky <daniel.bershatsky@skolkovotech.ru> | 2019-04-12 02:30:19 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-04-12 02:31:46 +0200 |
commit | 8dbf23181add0393556bdb3f4d026e46c7dcbf1e (patch) | |
tree | 1e90f9c9ae08f13688443cbbe22c6437fd716967 /scripts/gen_vimdoc.py | |
parent | fd00806f01673891a4970851612dea1838a39fb9 (diff) | |
download | rneovim-8dbf23181add0393556bdb3f4d026e46c7dcbf1e.tar.gz rneovim-8dbf23181add0393556bdb3f4d026e46c7dcbf1e.tar.bz2 rneovim-8dbf23181add0393556bdb3f4d026e46c7dcbf1e.zip |
RPC: conform message-id type to msgpack-RPC spec
According to [MessagePack RPC specification](https://github.com/msgpack-rpc/msgpack-rpc),
message ID must be 32-bit unsigned integer. But Neovim implementation
uses uint64_t instead of uint32_t. This can have wrong results in the
case of large ids or a malformed request, for example:
Actual response: [1,18446744073709551615,[1,"Message is not an array"],null]
Expected response: [1,4294967295,[1,"Message is not an array"],null]
The issue does not affect RPC clients written in dynamically-typed
languages like Python. Wrong type of sequence id number breaks RPC
clients written statically typed languages like C/C++/Golang: all of
them expect uint32_t as message id.
Examples:
https://github.com/msgpack-rpc/msgpack-rpc-cpp/blob/11268ba2be5954ddbb2b7676c7da576985e45cfc/src/msgpack/rpc/protocol.h#L27
https://github.com/ugorji/go/blob/master/codec/msgpack.go#L993
closes #8850
Diffstat (limited to 'scripts/gen_vimdoc.py')
0 files changed, 0 insertions, 0 deletions