Karsten Hopp eb47e8
To: vim_dev@googlegroups.com
Karsten Hopp eb47e8
Subject: Patch 7.3.068
Karsten Hopp eb47e8
Fcc: outbox
Karsten Hopp eb47e8
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp eb47e8
Mime-Version: 1.0
Karsten Hopp eb47e8
Content-Type: text/plain; charset=UTF-8
Karsten Hopp eb47e8
Content-Transfer-Encoding: 8bit
Karsten Hopp eb47e8
------------
Karsten Hopp eb47e8
Karsten Hopp eb47e8
Patch 7.3.068
Karsten Hopp eb47e8
Problem:    Using freed memory when doing ":saveas" and an autocommand sets
Karsten Hopp eb47e8
	    'autochdir'. (Kevin Klement)
Karsten Hopp eb47e8
Solution:   Get the value of fname again after executing autocommands.
Karsten Hopp eb47e8
Files:	    src/ex_cmds.c
Karsten Hopp eb47e8
Karsten Hopp eb47e8
Karsten Hopp eb47e8
*** ../vim-7.3.067/src/ex_cmds.c	2010-10-15 20:20:00.000000000 +0200
Karsten Hopp eb47e8
--- src/ex_cmds.c	2010-11-24 17:53:07.000000000 +0100
Karsten Hopp eb47e8
***************
Karsten Hopp eb47e8
*** 2705,2710 ****
Karsten Hopp eb47e8
--- 2705,2714 ----
Karsten Hopp eb47e8
  									TRUE);
Karsten Hopp eb47e8
  		do_modelines(0);
Karsten Hopp eb47e8
  	    }
Karsten Hopp eb47e8
+ 
Karsten Hopp eb47e8
+ 	    /* Autocommands may have changed buffer names, esp. when
Karsten Hopp eb47e8
+ 	     * 'autochdir' is set. */
Karsten Hopp eb47e8
+ 	    fname = curbuf->b_sfname;
Karsten Hopp eb47e8
  #endif
Karsten Hopp eb47e8
  	}
Karsten Hopp eb47e8
  
Karsten Hopp eb47e8
*** ../vim-7.3.067/src/version.c	2010-11-24 17:03:34.000000000 +0100
Karsten Hopp eb47e8
--- src/version.c	2010-11-24 17:55:11.000000000 +0100
Karsten Hopp eb47e8
***************
Karsten Hopp eb47e8
*** 716,717 ****
Karsten Hopp eb47e8
--- 716,719 ----
Karsten Hopp eb47e8
  {   /* Add new patch number below this line */
Karsten Hopp eb47e8
+ /**/
Karsten Hopp eb47e8
+     68,
Karsten Hopp eb47e8
  /**/
Karsten Hopp eb47e8
Karsten Hopp eb47e8
-- 
Karsten Hopp eb47e8
I used to wonder about the meaning of life.  But I looked it
Karsten Hopp eb47e8
up in the dictionary under "L" and there it was - the meaning
Karsten Hopp eb47e8
of life.  It was less than I expected.              - Dogbert
Karsten Hopp eb47e8
Karsten Hopp eb47e8
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp eb47e8
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp eb47e8
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp eb47e8
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///