|
|
8b9a1c |
To: vim_dev@googlegroups.com
|
|
|
8b9a1c |
Subject: Patch 7.4.010
|
|
|
8b9a1c |
Fcc: outbox
|
|
|
8b9a1c |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
8b9a1c |
Mime-Version: 1.0
|
|
|
8b9a1c |
Content-Type: text/plain; charset=UTF-8
|
|
|
8b9a1c |
Content-Transfer-Encoding: 8bit
|
|
|
8b9a1c |
------------
|
|
|
8b9a1c |
|
|
|
8b9a1c |
Patch 7.4.010 (after 7.4.006)
|
|
|
8b9a1c |
Problem: Crash with invalid argument to mkdir().
|
|
|
8b9a1c |
Solution: Check for empty string. (lcd47)
|
|
|
8b9a1c |
Files: src/eval.c
|
|
|
8b9a1c |
|
|
|
8b9a1c |
|
|
|
8b9a1c |
*** ../vim-7.4.009/src/eval.c 2013-08-22 12:06:50.000000000 +0200
|
|
|
8b9a1c |
--- src/eval.c 2013-08-30 15:47:47.000000000 +0200
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 14292,14309 ****
|
|
|
8b9a1c |
return;
|
|
|
8b9a1c |
|
|
|
8b9a1c |
dir = get_tv_string_buf(&argvars[0], buf);
|
|
|
8b9a1c |
! if (*gettail(dir) == NUL)
|
|
|
8b9a1c |
! /* remove trailing slashes */
|
|
|
8b9a1c |
! *gettail_sep(dir) = NUL;
|
|
|
8b9a1c |
!
|
|
|
8b9a1c |
! if (argvars[1].v_type != VAR_UNKNOWN)
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
! if (argvars[2].v_type != VAR_UNKNOWN)
|
|
|
8b9a1c |
! prot = get_tv_number_chk(&argvars[2], NULL);
|
|
|
8b9a1c |
! if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
|
|
|
8b9a1c |
! mkdir_recurse(dir, prot);
|
|
|
8b9a1c |
}
|
|
|
8b9a1c |
- rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
|
|
|
8b9a1c |
}
|
|
|
8b9a1c |
#endif
|
|
|
8b9a1c |
|
|
|
8b9a1c |
--- 14292,14314 ----
|
|
|
8b9a1c |
return;
|
|
|
8b9a1c |
|
|
|
8b9a1c |
dir = get_tv_string_buf(&argvars[0], buf);
|
|
|
8b9a1c |
! if (*dir == NUL)
|
|
|
8b9a1c |
! rettv->vval.v_number = FAIL;
|
|
|
8b9a1c |
! else
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
! if (*gettail(dir) == NUL)
|
|
|
8b9a1c |
! /* remove trailing slashes */
|
|
|
8b9a1c |
! *gettail_sep(dir) = NUL;
|
|
|
8b9a1c |
!
|
|
|
8b9a1c |
! if (argvars[1].v_type != VAR_UNKNOWN)
|
|
|
8b9a1c |
! {
|
|
|
8b9a1c |
! if (argvars[2].v_type != VAR_UNKNOWN)
|
|
|
8b9a1c |
! prot = get_tv_number_chk(&argvars[2], NULL);
|
|
|
8b9a1c |
! if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
|
|
|
8b9a1c |
! mkdir_recurse(dir, prot);
|
|
|
8b9a1c |
! }
|
|
|
8b9a1c |
! rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
|
|
|
8b9a1c |
}
|
|
|
8b9a1c |
}
|
|
|
8b9a1c |
#endif
|
|
|
8b9a1c |
|
|
|
8b9a1c |
*** ../vim-7.4.009/src/version.c 2013-08-25 17:46:05.000000000 +0200
|
|
|
8b9a1c |
--- src/version.c 2013-08-30 15:48:37.000000000 +0200
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 729,730 ****
|
|
|
8b9a1c |
--- 729,732 ----
|
|
|
8b9a1c |
{ /* Add new patch number below this line */
|
|
|
8b9a1c |
+ /**/
|
|
|
8b9a1c |
+ 10,
|
|
|
8b9a1c |
/**/
|
|
|
8b9a1c |
|
|
|
8b9a1c |
--
|
|
|
8b9a1c |
I wish there was a knob on the TV to turn up the intelligence.
|
|
|
8b9a1c |
There's a knob called "brightness", but it doesn't seem to work.
|
|
|
8b9a1c |
|
|
|
8b9a1c |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
8b9a1c |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
8b9a1c |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
8b9a1c |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|