summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0581
blob: 8b5586a9492a270f1ded687f951b76cbd04c1fa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0581
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0581
Problem:    Double free without the text properties feature.
Solution:   Reset the dirty flag.
Files:	    src/memline.c


*** ../vim-8.1.0580/src/memline.c	2018-12-13 22:17:52.877941474 +0100
--- src/memline.c	2018-12-13 23:12:29.129964078 +0100
***************
*** 3176,3184 ****
      {
  	// another line is buffered, flush it
  	ml_flush_line(curbuf);
  
  #ifdef FEAT_TEXT_PROP
- 	curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
  	if (has_any_text_properties(curbuf))
  	    // Need to fetch the old line to copy over any text properties.
  	    ml_get_buf(curbuf, lnum, TRUE);
--- 3176,3184 ----
      {
  	// another line is buffered, flush it
  	ml_flush_line(curbuf);
+ 	curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
  
  #ifdef FEAT_TEXT_PROP
  	if (has_any_text_properties(curbuf))
  	    // Need to fetch the old line to copy over any text properties.
  	    ml_get_buf(curbuf, lnum, TRUE);
*** ../vim-8.1.0580/src/version.c	2018-12-13 23:05:52.740820586 +0100
--- src/version.c	2018-12-13 23:15:49.320578507 +0100
***************
*** 801,802 ****
--- 801,804 ----
  {   /* Add new patch number below this line */
+ /**/
+     581,
  /**/

-- 
No engineer can take a shower without wondering if some sort of Teflon coating
would make showering unnecessary.
				(Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///