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 -- [email protected] -- 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    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui