diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-03-02 17:23:21 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-03-02 17:23:21 +0100 |
commit | 8006d69d3c05ef92f5915984baae79ef832380e5 (patch) | |
tree | c2c1874a31c2170b19d0a16c19323f58f4b53f43 /src | |
parent | 5e3dae8b6ba205faf78af4b6eaeb5947c309ca59 (diff) | |
download | vim-git-8006d69d3c05ef92f5915984baae79ef832380e5.tar.gz |
updated for version 7.2.382v7.2.382
Problem: Accessing freed memory when closing the cmdline window when
'bufhide' is set to "wipe".
Solution: Check if the buffer still exists before invoking close_buffer()
(Dominique Pelle)
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_getln.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 6b5a824bd..0f0f17075 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -6252,7 +6252,11 @@ ex_window() bp = curbuf; win_goto(old_curwin); win_close(wp, TRUE); - close_buffer(NULL, bp, DOBUF_WIPE); + + /* win_close() may have already wiped the buffer when 'bh' is + * set to 'wipe' */ + if (buf_valid(bp)) + close_buffer(NULL, bp, DOBUF_WIPE); /* Restore window sizes. */ win_size_restore(&winsizes); diff --git a/src/version.c b/src/version.c index d541e2d04..851d98b3c 100644 --- a/src/version.c +++ b/src/version.c @@ -682,6 +682,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 382, +/**/ 381, /**/ 380, |