diff options
author | Christian Brabandt <cb@256bit.org> | 2023-09-03 21:43:46 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-09-03 21:43:46 +0200 |
commit | 6e60cf444a8839ca1694319bf9a82e7b097e5c4d (patch) | |
tree | 0ae96b7f0834c9e82cd174dda7683eb209dd46e3 /src/buffer.c | |
parent | ee9166eb3b41846661a39b662dc7ebe8b5e15139 (diff) |
patch 9.0.1859: heap-use-after-free in bt_normal()v9.0.1859
Problem: heap-use-after-free in bt_normal()
Solution: check that buffer is still valid
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index 14eac92b97..93f9245f27 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5777,7 +5777,7 @@ bt_normal(buf_T *buf) bt_quickfix(buf_T *buf UNUSED) { #ifdef FEAT_QUICKFIX - return buf != NULL && buf->b_p_bt[0] == 'q'; + return buf != NULL && buf_valid(buf) && buf->b_p_bt[0] == 'q'; #else return FALSE; #endif |