To: vim_dev@googlegroups.com Subject: Patch 8.2.0642 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0642 Problem: Vim9: using invalid index. Solution: Check index for being valid. Fix memory leak. Files: src/vim9compile.c, src/clientserver.c *** ../vim-8.2.0641/src/vim9compile.c 2020-04-26 13:50:38.432096840 +0200 --- src/vim9compile.c 2020-04-26 14:25:00.255408835 +0200 *************** *** 5822,5833 **** compile_exec(char_u *line, exarg_T *eap, cctx_T *cctx) { char_u *p; ! int has_expr; if (cctx->ctx_skip == TRUE) goto theend; ! has_expr = (excmd_get_argt(eap->cmdidx) & (EX_XFILE | EX_EXPAND)); if (eap->cmdidx == CMD_syntax && STRNCMP(eap->arg, "include ", 8) == 0) { // expand filename in "syntax include [@group] filename" --- 5822,5834 ---- compile_exec(char_u *line, exarg_T *eap, cctx_T *cctx) { char_u *p; ! int has_expr = FALSE; if (cctx->ctx_skip == TRUE) goto theend; ! if (eap->cmdidx >= 0 && eap->cmdidx < CMD_SIZE) ! has_expr = (excmd_get_argt(eap->cmdidx) & (EX_XFILE | EX_EXPAND)); if (eap->cmdidx == CMD_syntax && STRNCMP(eap->arg, "include ", 8) == 0) { // expand filename in "syntax include [@group] filename" *** ../vim-8.2.0641/src/clientserver.c 2020-04-05 20:20:40.100596581 +0200 --- src/clientserver.c 2020-04-26 14:28:46.191081973 +0200 *************** *** 473,478 **** --- 473,479 ---- # ifdef FEAT_GUI_MSWIN Shell_NotifyIcon(NIM_DELETE, &ni); # endif + vim_free(done); } } else if (STRICMP(argv[i], "--remote-expr") == 0) *** ../vim-8.2.0641/src/version.c 2020-04-26 13:50:38.436096831 +0200 --- src/version.c 2020-04-26 14:29:06.199049252 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 642, /**/ -- hundred-and-one symptoms of being an internet addict: 20. When looking at a pageful of someone else's links, you notice all of them are already highlighted in purple. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///