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.4 / 7.4.010 < prev    next >
Encoding:
Internet Message Format  |  2013-08-29  |  2.3 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.010
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.010 (after 7.4.006)
  11. Problem:    Crash with invalid argument to mkdir().
  12. Solution:   Check for empty string. (lcd47)
  13. Files:        src/eval.c
  14.  
  15.  
  16. *** ../vim-7.4.009/src/eval.c    2013-08-22 12:06:50.000000000 +0200
  17. --- src/eval.c    2013-08-30 15:47:47.000000000 +0200
  18. ***************
  19. *** 14292,14309 ****
  20.       return;
  21.   
  22.       dir = get_tv_string_buf(&argvars[0], buf);
  23. !     if (*gettail(dir) == NUL)
  24. !     /* remove trailing slashes */
  25. !     *gettail_sep(dir) = NUL;
  26. !     if (argvars[1].v_type != VAR_UNKNOWN)
  27.       {
  28. !     if (argvars[2].v_type != VAR_UNKNOWN)
  29. !         prot = get_tv_number_chk(&argvars[2], NULL);
  30. !     if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
  31. !         mkdir_recurse(dir, prot);
  32.       }
  33. -     rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
  34.   }
  35.   #endif
  36.   
  37. --- 14292,14314 ----
  38.       return;
  39.   
  40.       dir = get_tv_string_buf(&argvars[0], buf);
  41. !     if (*dir == NUL)
  42. !     rettv->vval.v_number = FAIL;
  43. !     else
  44.       {
  45. !     if (*gettail(dir) == NUL)
  46. !         /* remove trailing slashes */
  47. !         *gettail_sep(dir) = NUL;
  48. !     if (argvars[1].v_type != VAR_UNKNOWN)
  49. !     {
  50. !         if (argvars[2].v_type != VAR_UNKNOWN)
  51. !         prot = get_tv_number_chk(&argvars[2], NULL);
  52. !         if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
  53. !         mkdir_recurse(dir, prot);
  54. !     }
  55. !     rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
  56.       }
  57.   }
  58.   #endif
  59.   
  60. *** ../vim-7.4.009/src/version.c    2013-08-25 17:46:05.000000000 +0200
  61. --- src/version.c    2013-08-30 15:48:37.000000000 +0200
  62. ***************
  63. *** 729,730 ****
  64. --- 729,732 ----
  65.   {   /* Add new patch number below this line */
  66. + /**/
  67. +     10,
  68.   /**/
  69.  
  70. -- 
  71. I wish there was a knob on the TV to turn up the intelligence.
  72. There's a knob called "brightness", but it doesn't seem to work. 
  73.  
  74.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  75. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  76. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  77.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  78.