Skip to content

Commit fd836aa

Browse files
committed
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 <[email protected]>
1 parent 7ab76a8 commit fd836aa

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/change.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ f_listener_add(typval_T *argvars, typval_T *rettv)
321321
buf_T *buf = curbuf;
322322
int unbuffered = 0;
323323

324+
if (check_secure())
325+
return;
326+
324327
if (recursive)
325328
{
326329
emsg(_(e_cannot_add_listener_in_listener_callback));
@@ -386,6 +389,9 @@ f_listener_flush(typval_T *argvars, typval_T *rettv UNUSED)
386389
{
387390
buf_T *buf = curbuf;
388391

392+
if (check_secure())
393+
return;
394+
389395
if (recursive)
390396
return;
391397

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

448+
if (check_secure())
449+
return;
450+
442451
if (in_vim9script() && check_for_number_arg(argvars, 0) == FAIL)
443452
return;
444453

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,8 @@ static char *(features[]) =
734734

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
317,
737739
/**/
738740
316,
739741
/**/

0 commit comments

Comments
 (0)