mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 09:56:31 +00:00
vim-patch:9.0.1858: [security] heap use after free in ins_compl_get_exp()
Problem: heap use after free in ins_compl_get_exp()
Solution: validate buffer before accessing it
ee9166eb3b
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -3435,7 +3435,7 @@ static int ins_compl_get_exp(pos_T *ini)
|
||||
compl_started = true;
|
||||
} else {
|
||||
// Mark a buffer scanned when it has been scanned completely
|
||||
if (type == 0 || type == CTRL_X_PATH_PATTERNS) {
|
||||
if (buf_valid(st.ins_buf) && (type == 0 || type == CTRL_X_PATH_PATTERNS)) {
|
||||
assert(st.ins_buf);
|
||||
st.ins_buf->b_scanned = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user