diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-17 20:17:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-17 20:17:40 +0200 |
commit | 787880a86dbcb79cdf6e8241b1d99ac4a7acbc09 (patch) | |
tree | 3c486f6ec9d5f45e52c2b6b26df957a9723bf951 | |
parent | 80e737cc6ab6b68948f6765348b6881be861b200 (diff) | |
download | vim-git-787880a86dbcb79cdf6e8241b1d99ac4a7acbc09.tar.gz |
patch 8.1.1342: using freed memory when joining line with text propertyv8.1.1342
Problem: Using freed memory when joining line with text property.
Solution: Use already computed length.
-rw-r--r-- | src/ops.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -4635,7 +4635,7 @@ do_join( { /* 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 = (colnr_T)sumsize; } /* Only report the change in the first line here, del_lines() will report diff --git a/src/version.c b/src/version.c index f9329ba8c..07db364bf 100644 --- a/src/version.c +++ b/src/version.c @@ -768,6 +768,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1342, +/**/ 1341, /**/ 1340, |