mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 7.4.1137
Problem: Illegal memory access when using :copen and :cclose. Solution: Avoid that curbuf is invalid. (suggestion by Justin M. Keyes) Add a test.
This commit is contained in:
parent
da5dcd9366
commit
62ef797496
@ -295,4 +295,10 @@ function Test_nomem()
|
|||||||
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
function Test_helpgrep()
|
||||||
|
helpgrep quickfix
|
||||||
|
copen
|
||||||
|
" This wipes out the buffer, make sure that doesn't cause trouble.
|
||||||
|
cclose
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1137,
|
||||||
/**/
|
/**/
|
||||||
1136,
|
1136,
|
||||||
/**/
|
/**/
|
||||||
|
@ -2445,6 +2445,10 @@ win_close(win, free_buf)
|
|||||||
if (win_valid(win))
|
if (win_valid(win))
|
||||||
win->w_closing = FALSE;
|
win->w_closing = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
/* Make sure curbuf is valid. It can become invalid if 'bufhidden' is
|
||||||
|
* "wipe". */
|
||||||
|
if (!buf_valid(curbuf))
|
||||||
|
curbuf = firstbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (only_one_window() && win_valid(win) && win->w_buffer == NULL
|
if (only_one_window() && win_valid(win) && win->w_buffer == NULL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user