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

patch 8.1.0581: double free without the text properties feature

Problem:    Double free without the text properties feature.
Solution:   Reset the dirty flag.
This commit is contained in:
Bram Moolenaar
2018-12-13 23:16:36 +01:00
parent 2fa7fad831
commit ca79a5fc3b
2 changed files with 3 additions and 1 deletions

View File

@@ -3176,9 +3176,9 @@ ml_replace_len(linenr_T lnum, char_u *line_arg, colnr_T len_arg, int copy)
{ {
// another line is buffered, flush it // another line is buffered, flush it
ml_flush_line(curbuf); ml_flush_line(curbuf);
curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
#ifdef FEAT_TEXT_PROP #ifdef FEAT_TEXT_PROP
curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
if (has_any_text_properties(curbuf)) if (has_any_text_properties(curbuf))
// Need to fetch the old line to copy over any text properties. // Need to fetch the old line to copy over any text properties.
ml_get_buf(curbuf, lnum, TRUE); ml_get_buf(curbuf, lnum, TRUE);

View File

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