neovim/neovim — pull request #1737 by fwalch (2014-12-25 11:32:43+00:00)
Title: [RFC] vim-patch:7.4.541

```
Problem: Crash when doing a range assign.
Solution: Check for NULL poiter. (Yukihiro Nakadaira)

https://code.google.com/p/vim/source/detail?r=v7-4-541
```

Original patch:
```diff
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
--- a/src/nvim/eval.c
+++ b/src/nvim/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/nvim/testdir/test55.in b/src/nvim/testdir/test55.in
--- a/src/nvim/testdir/test55.in
+++ b/src/nvim/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/nvim/testdir/test55.ok b/src/nvim/testdir/test55.ok
--- a/src/nvim/testdir/test55.ok
+++ b/src/nvim/testdir/test55.ok
@@ -129,6 +129,7 @@ 1
{'a': {'b': 'B'}}
Vim(call):E737: a
{'a': {'b': 'B'}}
+[1, 2]
Vim(foldopen):E490:

diff --git a/src/nvim/version.c b/src/nvim/version.c
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 541,
+/**/
540,
/**/
539,
```