mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:9.0.1857: [security] heap-use-after-free in is_qf_win()
Problem: heap-use-after-free in is_qf_win()
Solution: Check buffer is valid before accessing it
fc68299d43
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -698,7 +698,7 @@ void getout(int exitval)
|
||||
for (const tabpage_T *tp = first_tabpage; tp != NULL; tp = next_tp) {
|
||||
next_tp = tp->tp_next;
|
||||
FOR_ALL_WINDOWS_IN_TAB(wp, tp) {
|
||||
if (wp->w_buffer == NULL) {
|
||||
if (wp->w_buffer == NULL || !buf_valid(wp->w_buffer)) {
|
||||
// Autocmd must have close the buffer already, skip.
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user