0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2019-05-17 20:17:40 +02:00
parent 80e737cc6a
commit 787880a86d
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -767,6 +767,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1342,
/**/
1341,
/**/