From ace7e4e11ba18b769aa028d73808b9405ec5e437 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 25 Jun 2019 00:19:46 -0400 Subject: vim-patch:8.1.1342: using freed memory when joining line with text property Problem: Using freed memory when joining line with text property. Solution: Use already computed length. https://github.com/vim/vim/commit/787880a86dbcb79cdf6e8241b1d99ac4a7acbc09 --- src/nvim/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/ops.c b/src/nvim/ops.c index b5408fab9a..b96e075f66 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -3749,7 +3749,7 @@ int do_join(size_t count, if (setmark) { // Set the '] mark. curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum; - curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp); + curwin->w_buffer->b_op_end.col = sumsize; } /* Only report the change in the first line here, del_lines() will report -- cgit