| 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 |
| |
| |
| |
| |
| |
| *** 2705,2710 **** |
| --- 2705,2714 ---- |
| TRUE); |
| do_modelines(0); |
| } |
| + |
| + /* Autocommands may have changed buffer names, esp. when |
| + * 'autochdir' is set. */ |
| + fname = curbuf->b_sfname; |
| #endif |
| } |
| |
| |
| |
| |
| *** 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 /// |