home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.0 / 7.0.024 < prev    next >
Encoding:
Internet Message Format  |  2006-06-21  |  1.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.0.024
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.0.024
  11. Problem:    It is possible to set arbitrary "v:" variables.
  12. Solution:   Disallow setting "v:" variables that are not predefined.
  13. Files:        src/eval.c
  14.  
  15.  
  16. *** ../vim-7.0.023/src/eval.c    Sat May 13 13:36:47 2006
  17. --- src/eval.c    Thu Jun 22 17:27:51 2006
  18. ***************
  19. *** 17759,17764 ****
  20. --- 17763,17775 ----
  21.       }
  22.       else            /* add a new variable */
  23.       {
  24. +     /* Can't add "v:" variable. */
  25. +     if (ht == &vimvarht)
  26. +     {
  27. +         EMSG2(_(e_illvar), name);
  28. +         return;
  29. +     }
  30.       /* Make sure the variable name is valid. */
  31.       for (p = varname; *p != NUL; ++p)
  32.           if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p))
  33. *** ../vim-7.0.023/src/version.c    Thu Jun 22 16:48:43 2006
  34. --- src/version.c    Thu Jun 22 17:30:59 2006
  35. ***************
  36. *** 668,669 ****
  37. --- 668,671 ----
  38.   {   /* Add new patch number below this line */
  39. + /**/
  40. +     24,
  41.   /**/
  42.  
  43. -- 
  44. ARTHUR:  No, hang on!  Just answer the five questions ...
  45. GALAHAD: Three questions ...
  46. ARTHUR:  Three questions ...  And we shall watch ... and pray.
  47.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  48.  
  49.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  50. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  51. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  52.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  53.