Commit: patch 9.2.0317: listener functions do not check secure flag

1 view
Skip to first unread message

Christian Brabandt

unread,
3:32 PM (6 hours ago) 3:32 PM
to vim...@googlegroups.com
patch 9.2.0317: listener functions do not check secure flag

Commit: https://github.com/vim/vim/commit/fd836aab1351cad952d2790908471f39439c3154
Author: Christian Brabandt <c...@256bit.org>
Date: Tue Apr 7 18:57:04 2026 +0000

patch 9.2.0317: listener functions do not check secure flag

Problem: listener functions do not check secure flag
(syndicate)
Solution: Call check_secure()

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/change.c b/src/change.c
index 8dd7e9d9b..ecb27d72d 100644
--- a/src/change.c
+++ b/src/change.c
@@ -321,6 +321,9 @@ f_listener_add(typval_T *argvars, typval_T *rettv)
buf_T *buf = curbuf;
int unbuffered = 0;

+ if (check_secure())
+ return;
+
if (recursive)
{
emsg(_(e_cannot_add_listener_in_listener_callback));
@@ -386,6 +389,9 @@ f_listener_flush(typval_T *argvars, typval_T *rettv UNUSED)
{
buf_T *buf = curbuf;

+ if (check_secure())
+ return;
+
if (recursive)
return;

@@ -439,6 +445,9 @@ f_listener_remove(typval_T *argvars, typval_T *rettv)
int id;
buf_T *buf;

+ if (check_secure())
+ return;
+
if (in_vim9script() && check_for_number_arg(argvars, 0) == FAIL)
return;

diff --git a/src/version.c b/src/version.c
index bd2a359b7..f86607789 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 317,
/**/
316,
/**/
Reply all
Reply to author
Forward
0 new messages