To: vim-dev@vim.org Subject: Patch 7.0.024 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.0.024 Problem: It is possible to set arbitrary "v:" variables. Solution: Disallow setting "v:" variables that are not predefined. Files: src/eval.c *** ../vim-7.0.023/src/eval.c Sat May 13 13:36:47 2006 --- src/eval.c Thu Jun 22 17:27:51 2006 *************** *** 17759,17764 **** --- 17763,17775 ---- } else /* add a new variable */ { + /* Can't add "v:" variable. */ + if (ht == &vimvarht) + { + EMSG2(_(e_illvar), name); + return; + } + /* Make sure the variable name is valid. */ for (p = varname; *p != NUL; ++p) if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) *** ../vim-7.0.023/src/version.c Thu Jun 22 16:48:43 2006 --- src/version.c Thu Jun 22 17:30:59 2006 *************** *** 668,669 **** --- 668,671 ---- { /* Add new patch number below this line */ + /**/ + 24, /**/ -- ARTHUR: No, hang on! Just answer the five questions ... GALAHAD: Three questions ... ARTHUR: Three questions ... And we shall watch ... and pray. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///