0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.4.541

Problem:    Crash when doing a range assign.
Solution:   Check for NULL poiter. (Yukihiro Nakadaira)
This commit is contained in:
Bram Moolenaar
2014-12-07 00:18:33 +01:00
parent ed32d9424d
commit b2a851fee4
4 changed files with 9 additions and 1 deletions

View File

@@ -2951,7 +2951,7 @@ set_var_lval(lp, endp, rettv, copy, op)
/* /*
* Check whether any of the list items is locked * Check whether any of the list items is locked
*/ */
for (ri = rettv->vval.v_list->lv_first; ri != NULL; ) for (ri = rettv->vval.v_list->lv_first; ri != NULL && ll_li != NULL; )
{ {
if (tv_check_lock(ll_li->li_tv.v_lock, lp->ll_name)) if (tv_check_lock(ll_li->li_tv.v_lock, lp->ll_name))
return; return;

View File

@@ -401,6 +401,11 @@ let l = [0, 1, 2, 3]
: $put =v:exception[:15] . v:exception[-1:-1] : $put =v:exception[:15] . v:exception[-1:-1]
:endtry :endtry
:$put =string(d) :$put =string(d)
:"
:" test for range assign
:let l = [0]
:let l[:] = [1, 2]
:$put =string(l)
:endfun :endfun
:" :"
:call Test(1, 2, [3, 4], {5: 6}) " This may take a while :call Test(1, 2, [3, 4], {5: 6}) " This may take a while

View File

@@ -129,6 +129,7 @@ caught a:000[3]
{'a': {'b': 'B'}} {'a': {'b': 'B'}}
Vim(call):E737: a Vim(call):E737: a
{'a': {'b': 'B'}} {'a': {'b': 'B'}}
[1, 2]
Vim(foldopen):E490: Vim(foldopen):E490:

View File

@@ -741,6 +741,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 */
/**/
541,
/**/ /**/
540, 540,
/**/ /**/