summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2010-11-24 17:59:32 +0100
committerBram Moolenaar <bram@vim.org>2010-11-24 17:59:32 +0100
commit95a96335b2d748ebb495e0a297c9aac76ec7d224 (patch)
tree216198d3fe85ed3afb924504ca513633ae2f7a70
parente30019bcf18a440e1b14c2e27ec76bdb980ff592 (diff)
downloadvim-7-3-068.tar.gz
updated for version 7.3.068v7.3.068v7-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.
-rw-r--r--src/ex_cmds.c4
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index b3f76192..8a24c0a7 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2705,6 +2705,10 @@ do_write(eap)
TRUE);
do_modelines(0);
}
+
+ /* Autocommands may have changed buffer names, esp. when
+ * 'autochdir' is set. */
+ fname = curbuf->b_sfname;
#endif
}
diff --git a/src/version.c b/src/version.c
index bd569622..d92f0904 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 68,
+/**/
67,
/**/
66,