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.235 < prev    next >
Encoding:
Internet Message Format  |  2007-04-28  |  2.2 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 7.0.235
  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.235
  11. Problem:    It is possible to use writefile() in the sandbox.
  12. Solution:   Add a few more checks for the sandbox.
  13. Files:      src/eval.c
  14.     
  15.  
  16. *** ../vim-7.0.234/src/eval.c    Fri Apr 27 22:17:43 2007
  17. --- src/eval.c    Sat Apr 28 21:36:02 2007
  18. ***************
  19. *** 15598,15603 ****
  20. --- 15598,15606 ----
  21.       int        err = FALSE;
  22.       FILE    *fd;
  23.   
  24. +     if (check_restricted() || check_secure())
  25. +     return;
  26.       if (argvars[1].v_type != VAR_UNKNOWN)
  27.       {
  28.       /*
  29. ***************
  30. *** 16430,16435 ****
  31. --- 16433,16441 ----
  32.       char_u    *s;
  33.       int        ret = 0;
  34.       int        c;
  35. +     if (check_restricted() || check_secure())
  36. +     return;
  37.   
  38.       if (argvars[0].v_type != VAR_LIST)
  39.       {
  40. *** ../vim-7.0.234/src/version.c    Fri Apr 27 22:17:43 2007
  41. --- src/version.c    Sun Apr 29 13:54:29 2007
  42. ***************
  43. *** 668,669 ****
  44. --- 668,671 ----
  45.   {   /* Add new patch number below this line */
  46. + /**/
  47. +     235,
  48.   /**/
  49.  
  50. -- 
  51. Now it is such a bizarrely improbable coincidence that anything as
  52. mind-bogglingly useful as the Babel fish could have evolved purely by chance
  53. that some thinkers have chosen to see it as a final and clinching proof of the
  54. NON-existence of God.
  55. The argument goes something like this: 'I refuse to prove that I exist,' says
  56. God, 'for proof denies faith, and without faith I am nothing.'
  57. 'But,' says Man, 'the Babel fish is a dead giveaway, isn't it?  It could not
  58. have evolved by chance.  It proves you exist, and so therefore, by your own
  59. arguments, you don't.  QED.'
  60. 'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a
  61. puff of logic.
  62. 'Oh, that was easy,' says Man, and for an encore goes on to prove that black
  63. is white and gets himself killed on the next pedestrian crossing.
  64.         -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
  65.  
  66.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  67. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  68. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  69.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  70.