summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.068
blob: 8acbcab9d5e273d90ba656e0886f621f1e1d5e42 (about) (plain) (blame)
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
To: vim_dev@googlegroups.com
Subject: Patch 7.3.068
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.068
Problem:    Using freed memory when doing ":saveas" and an autocommand sets
	    'autochdir'. (Kevin Klement)
Solution:   Get the value of fname again after executing autocommands.
Files:	    src/ex_cmds.c


*** ../vim-7.3.067/src/ex_cmds.c	2010-10-15 20:20:00.000000000 +0200
--- src/ex_cmds.c	2010-11-24 17:53:07.000000000 +0100
***************
*** 2705,2710 ****
--- 2705,2714 ----
  									TRUE);
  		do_modelines(0);
  	    }
+ 
+ 	    /* Autocommands may have changed buffer names, esp. when
+ 	     * 'autochdir' is set. */
+ 	    fname = curbuf->b_sfname;
  #endif
  	}
  
*** ../vim-7.3.067/src/version.c	2010-11-24 17:03:34.000000000 +0100
--- src/version.c	2010-11-24 17:55:11.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     68,
  /**/

-- 
I used to wonder about the meaning of life.  But I looked it
up in the dictionary under "L" and there it was - the meaning
of life.  It was less than I expected.              - Dogbert

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