vim-patch:8.0.0782: using freed memory in quickfix code

Problem:    Using freed memory in quickfix code. (Dominique Pelle)
Solution:   Handle a help window differently. (Yegappan Lakshmanan)
d28cc3f55d
This commit is contained in:
Jan Edmund Lazo
2018-09-06 05:08:15 -04:00
parent bb519fb261
commit dc15dcffad
5 changed files with 47 additions and 17 deletions

View File

@@ -252,7 +252,7 @@ open_buffer (
msg_silent = old_msg_silent;
// Help buffer is filtered.
if (curbuf->b_help) {
if (bt_help(curbuf)) {
fix_help_buffer();
}
} else if (read_stdin) {
@@ -4930,6 +4930,12 @@ chk_modeline (
return retval;
}
// Return true if "buf" is a help buffer.
bool bt_help(const buf_T *const buf)
{
return buf != NULL && buf->b_help;
}
/*
* Return special buffer name.
* Returns NULL when the buffer has a normal file name.