To: vim_dev@googlegroups.com Subject: Patch 8.2.4417 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4417 (after 8.2.4416) Problem: Using NULL pointer. Solution: Set offset after checking for NULL pointer. Files: src/userfunc.c *** ../vim-8.2.4416/src/userfunc.c 2022-02-18 17:50:00.445462060 +0000 --- src/userfunc.c 2022-02-18 18:33:34.405033096 +0000 *************** *** 4024,4030 **** get_scriptlocal_funcname(char_u *funcname) { char sid_buf[25]; ! int off = *funcname == 's' ? 2 : 5; char_u *newname; char_u *p = funcname; --- 4024,4030 ---- get_scriptlocal_funcname(char_u *funcname) { char sid_buf[25]; ! int off; char_u *newname; char_u *p = funcname; *************** *** 4047,4052 **** --- 4047,4054 ---- ++p; off = 0; } + else + off = *funcname == 's' ? 2 : 5; if (!SCRIPT_ID_VALID(current_sctx.sc_sid)) { *** ../vim-8.2.4416/src/version.c 2022-02-18 17:50:00.449462055 +0000 --- src/version.c 2022-02-18 18:34:36.212980812 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4417, /**/ -- "Thou shalt not follow the Null Pointer, for at its end Chaos and Madness lie." /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///