summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2023-09-03 20:20:52 +0200
committerChristian Brabandt <cb@256bit.org>2023-09-03 20:20:52 +0200
commitfc68299d436cf87453e432daa77b6d545df4d7ed (patch)
treede179fbfbc61e6d9f59d2343f777f2cb83c55fff /src/main.c
parentaa90d4f031f73a34aaef5746931ea746849a2231 (diff)
patch 9.0.1857: [security] heap-use-after-free in is_qf_win()v9.0.1857
Problem: heap-use-after-free in is_qf_win() Solution: Check buffer is valid before accessing it Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index cca53fe256..a40c3a6660 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1646,7 +1646,7 @@ getout(int exitval)
next_tp = tp->tp_next;
FOR_ALL_WINDOWS_IN_TAB(tp, wp)
{
- if (wp->w_buffer == NULL)
+ if (wp->w_buffer == NULL || !buf_valid(wp->w_buffer))
// Autocmd must have close the buffer already, skip.
continue;
buf = wp->w_buffer;