| To: vim-dev@vim.org |
| Subject: Patch 7.0.024 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| 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 |
| |
| |
| |
| |
| |
| *** 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)) |
| |
| |
| |
| *** 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 /// |