aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/deprecated.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-04-27 17:30:22 +0100
committerGitHub <noreply@github.com>2023-04-27 17:30:22 +0100
commiteb4676c67f5dd54bcda473783315901a3444b40b (patch)
treeb57dd8342e3de756031664188ab542ead9134c38 /src/nvim/api/deprecated.c
parent9f29176033926b81553985deaba0ea162ca40215 (diff)
downloadrneovim-eb4676c67f5dd54bcda473783315901a3444b40b.tar.gz
rneovim-eb4676c67f5dd54bcda473783315901a3444b40b.tar.bz2
rneovim-eb4676c67f5dd54bcda473783315901a3444b40b.zip
fix: disallow removing extmarks in on_lines callbacks (#23219)
fix(extmarks): disallow removing extmarks in on_lines callbacks decor_redraw_start (which runs before decor_providers_invoke_lines) gets references for the extmarks on a specific line. If these extmarks are deleted in on_lines callbacks then this results in a heap-use-after-free error. Fixes #22801
Diffstat (limited to 'src/nvim/api/deprecated.c')
-rw-r--r--src/nvim/api/deprecated.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/deprecated.c b/src/nvim/api/deprecated.c
index 5937b2f635..0ca505e7b2 100644
--- a/src/nvim/api/deprecated.c
+++ b/src/nvim/api/deprecated.c
@@ -172,7 +172,7 @@ Integer nvim_buf_set_virtual_text(Buffer buffer, Integer src_id, Integer line, A
decor.priority = 0;
extmark_set(buf, ns_id, NULL, (int)line, 0, -1, -1, &decor, true,
- false, kExtmarkNoUndo);
+ false, kExtmarkNoUndo, NULL);
return src_id;
}