summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1342
blob: b221e9bcade377cbfd22b09002cfa32910779ac4 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1342
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.1342
Problem:    Using freed memory when joining line with text property.
Solution:   Use already computed length.
Files:	    src/ops.c


*** ../vim-8.1.1341/src/ops.c	2019-05-17 19:56:29.860129184 +0200
--- src/ops.c	2019-05-17 20:15:24.378020917 +0200
***************
*** 4635,4641 ****
      {
  	/* 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);
      }
  
      /* Only report the change in the first line here, del_lines() will report
--- 4635,4641 ----
      {
  	/* Set the '] mark. */
  	curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
! 	curwin->w_buffer->b_op_end.col  = (colnr_T)sumsize;
      }
  
      /* Only report the change in the first line here, del_lines() will report
*** ../vim-8.1.1341/src/version.c	2019-05-17 19:56:29.860129184 +0200
--- src/version.c	2019-05-17 20:16:56.669433301 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1342,
  /**/

-- 
I once paid $12 to peer at the box that held King Tutankhamen's little
bandage-covered midget corpse at the De Young Museum in San Francisco.  I
remember thinking how pleased he'd be about the way things turned out in his
afterlife.
				(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    ///