patch 9.1.0728: [security]: heap-use-after-free in garbage collection with location list user data
Problem: heap-use-after-free in garbage collection with location list
user data.
Solution: Mark user data as in use when no other window is referencing
the location list (zeertzjq)
fixes: neovim/neovim#30371
closes: #15683
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/quickfix.c b/src/quickfix.c
index 414fe65..6f7d3a5 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -8011,6 +8011,10 @@
abort = mark_quickfix_ctx(win->w_llist_ref, copyID);
if (abort)
return abort;
+
+ abort = mark_quickfix_user_data(win->w_llist_ref, copyID);
+ if (abort)
+ return abort;
}
}