summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-12-07 00:18:33 +0100
committerBram Moolenaar <Bram@vim.org>2014-12-07 00:18:33 +0100
commitb2a851fee41a5a1faddcb862aef2beca69dc063a (patch)
tree7e3a2c1ccec0d8864027e21bed928d6dc26d6ef6 /src
parented32d9424d12f93dcdb96f2a5c512f7ad9945bee (diff)
downloadvim-b2a851fee41a5a1faddcb862aef2beca69dc063a.zip
updated for version 7.4.541
Problem: Crash when doing a range assign. Solution: Check for NULL poiter. (Yukihiro Nakadaira)
Diffstat (limited to 'src')
-rw-r--r--src/eval.c2
-rw-r--r--src/testdir/test55.in5
-rw-r--r--src/testdir/test55.ok1
-rw-r--r--src/version.c2
4 files changed, 9 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 840e1e8f8..5c584dead 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2951,7 +2951,7 @@ set_var_lval(lp, endp, rettv, copy, op)
/*
* 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))
return;
diff --git a/src/testdir/test55.in b/src/testdir/test55.in
index 140cb7c0e..c4e82d429 100644
--- a/src/testdir/test55.in
+++ b/src/testdir/test55.in
@@ -401,6 +401,11 @@ let l = [0, 1, 2, 3]
: $put =v:exception[:15] . v:exception[-1:-1]
:endtry
:$put =string(d)
+:"
+:" test for range assign
+:let l = [0]
+:let l[:] = [1, 2]
+:$put =string(l)
:endfun
:"
:call Test(1, 2, [3, 4], {5: 6}) " This may take a while
diff --git a/src/testdir/test55.ok b/src/testdir/test55.ok
index e8560de40..ba029b289 100644
--- a/src/testdir/test55.ok
+++ b/src/testdir/test55.ok
@@ -129,6 +129,7 @@ caught a:000[3]
{'a': {'b': 'B'}}
Vim(call):E737: a
{'a': {'b': 'B'}}
+[1, 2]
Vim(foldopen):E490:
diff --git a/src/version.c b/src/version.c
index 57b5d7642..451b837dc 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 541,
+/**/
540,
/**/
539,