commit | 2a77d21f7893ba14e682a3c5891d606f117a3f36 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Mon Mar 26 21:38:52 2018 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Mon Mar 26 21:38:52 2018 +0200 |
tree | a31c14cee7362eeac7d143a5090e465653fc118c | |
parent | 4368d5ce8a2fa16826d76eeb32347bbbb4fad2bc [diff] [blame] |
patch 8.0.1647: terminal API may call any user function Problem: Terminal API may call a function not meant to be called by this API. Solution: Require the function to start with Tapi_.
diff --git a/src/terminal.c b/src/terminal.c index 50e87c9..5875af6 100644 --- a/src/terminal.c +++ b/src/terminal.c
@@ -3193,7 +3193,7 @@ } func = get_tv_string(&item->li_tv); - if (!ASCII_ISUPPER(*func)) + if (STRNCMP(func, "Tapi_", 5) != 0) { ch_log(channel, "Invalid function name: %s", func); return;