mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
updated for version 7.4.010
Problem: Crash with invalid argument to mkdir(). Solution: Check for empty string. (lcd47)
This commit is contained in:
@@ -14292,6 +14292,10 @@ f_mkdir(argvars, rettv)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
dir = get_tv_string_buf(&argvars[0], buf);
|
dir = get_tv_string_buf(&argvars[0], buf);
|
||||||
|
if (*dir == NUL)
|
||||||
|
rettv->vval.v_number = FAIL;
|
||||||
|
else
|
||||||
|
{
|
||||||
if (*gettail(dir) == NUL)
|
if (*gettail(dir) == NUL)
|
||||||
/* remove trailing slashes */
|
/* remove trailing slashes */
|
||||||
*gettail_sep(dir) = NUL;
|
*gettail_sep(dir) = NUL;
|
||||||
@@ -14305,6 +14309,7 @@ f_mkdir(argvars, rettv)
|
|||||||
}
|
}
|
||||||
rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
|
rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -727,6 +727,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
10,
|
||||||
/**/
|
/**/
|
||||||
9,
|
9,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user