comparison src/terminal.c @ 13547:87a9c1be0ae3 v8.0.1647

patch 8.0.1647: terminal API may call any user function commit https://github.com/vim/vim/commit/2a77d21f7893ba14e682a3c5891d606f117a3f36 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 26 21:38:52 2018 +0200 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_.
author Christian Brabandt <cb@256bit.org>
date Mon, 26 Mar 2018 21:45:07 +0200
parents e9ffb5b35266
children 4911058c43eb
comparison
equal deleted inserted replaced
13546:dd1b0d2a49ae 13547:87a9c1be0ae3
3191 ch_log(channel, "Missing function arguments for call"); 3191 ch_log(channel, "Missing function arguments for call");
3192 return; 3192 return;
3193 } 3193 }
3194 func = get_tv_string(&item->li_tv); 3194 func = get_tv_string(&item->li_tv);
3195 3195
3196 if (!ASCII_ISUPPER(*func)) 3196 if (STRNCMP(func, "Tapi_", 5) != 0)
3197 { 3197 {
3198 ch_log(channel, "Invalid function name: %s", func); 3198 ch_log(channel, "Invalid function name: %s", func);
3199 return; 3199 return;
3200 } 3200 }
3201 3201