aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/rstream.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-10-28 09:17:57 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-10-28 10:21:05 -0300
commitc95bc3349b6df13d8a4b5c1c7f3440e4578b266c (patch)
tree67cdd4270fc25b542841949d2d6aa571b1c51aee /src/nvim/os/rstream.c
parent53ce5493faa4f3675dfd3c912d418ff9dc52f740 (diff)
downloadrneovim-c95bc3349b6df13d8a4b5c1c7f3440e4578b266c.tar.gz
rneovim-c95bc3349b6df13d8a4b5c1c7f3440e4578b266c.tar.bz2
rneovim-c95bc3349b6df13d8a4b5c1c7f3440e4578b266c.zip
input: Fix conversion error in `convert_input()`
The `rbuffer_consumed` was being passed a consumed count from another buffer, causing integer overflow in `rbuffer_relocate`. Fixes #1343
Diffstat (limited to 'src/nvim/os/rstream.c')
-rw-r--r--src/nvim/os/rstream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/os/rstream.c b/src/nvim/os/rstream.c
index d96b3d931c..beff404fd0 100644
--- a/src/nvim/os/rstream.c
+++ b/src/nvim/os/rstream.c
@@ -396,6 +396,7 @@ static void close_cb(uv_handle_t *handle)
static void rbuffer_relocate(RBuffer *rbuffer)
{
+ assert(rbuffer->rpos <= rbuffer->wpos);
// Move data ...
memmove(
rbuffer->data, // ...to the beginning of the buffer(rpos 0)