Problem: use-after-free with 'qftf' wiping buffer
Solution: Forbid changing the window layout or wiping the buffers.
https://github.com/vim/vim/pull/19142
(3 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@zeertzjq commented on this pull request.
In src/quickfix.c:
> @@ -5097,6 +5097,9 @@ call_qftf_func(qf_list_T *qfl, int qf_winid, long start_idx, long end_idx) args[0].vval.v_dict = d; qftf_list = NULL; + window_layout_lock(); + curwin->w_locked = TRUE; + curbuf->b_locked = TRUE;⬇️ Suggested change
- curbuf->b_locked = TRUE; + curbuf->b_locked++;
In src/quickfix.c:
> @@ -5106,6 +5109,9 @@ call_qftf_func(qf_list_T *qfl, int qf_winid, long start_idx, long end_idx) } clear_tv(&rettv); } + curbuf->b_locked = FALSE;⬇️ Suggested change
- curbuf->b_locked = FALSE; + curbuf->b_locked--;
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
eval_foldexpr() just uses textlock, which is simpler and safer (but it also prevents changing text). I guess textlock can be used here instead too?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
. I guess textlock can be used here instead too, or is it too restrictive?
Yeah, I wondered about this too. In principle that should be fine for the quickfixtextfunc. Let me see if this prevents a :bw
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()