Karsten Hopp 8bd20a
To: vim_dev@googlegroups.com
Karsten Hopp 8bd20a
Subject: Patch 7.4.513
Karsten Hopp 8bd20a
Fcc: outbox
Karsten Hopp 8bd20a
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 8bd20a
Mime-Version: 1.0
Karsten Hopp 8bd20a
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 8bd20a
Content-Transfer-Encoding: 8bit
Karsten Hopp 8bd20a
------------
Karsten Hopp 8bd20a
Karsten Hopp 8bd20a
Patch 7.4.513
Karsten Hopp 8bd20a
Problem:    Crash because reference count is wrong for list returned by
Karsten Hopp 8bd20a
	    getreg().
Karsten Hopp 8bd20a
Solution:   Increment the reference count. (Kimmy Lindvall)
Karsten Hopp 8bd20a
Files:	    src/eval.c
Karsten Hopp 8bd20a
Karsten Hopp 8bd20a
Karsten Hopp 8bd20a
*** ../vim-7.4.512/src/eval.c	2014-11-05 18:05:48.656441306 +0100
Karsten Hopp 8bd20a
--- src/eval.c	2014-11-12 17:07:32.695012604 +0100
Karsten Hopp 8bd20a
***************
Karsten Hopp 8bd20a
*** 12008,12013 ****
Karsten Hopp 8bd20a
--- 12008,12015 ----
Karsten Hopp 8bd20a
  	rettv->v_type = VAR_LIST;
Karsten Hopp 8bd20a
  	rettv->vval.v_list = (list_T *)get_reg_contents(regname,
Karsten Hopp 8bd20a
  				      (arg2 ? GREG_EXPR_SRC : 0) | GREG_LIST);
Karsten Hopp 8bd20a
+ 	if (rettv->vval.v_list != NULL)
Karsten Hopp 8bd20a
+ 	    ++rettv->vval.v_list->lv_refcount;
Karsten Hopp 8bd20a
      }
Karsten Hopp 8bd20a
      else
Karsten Hopp 8bd20a
      {
Karsten Hopp 8bd20a
*** ../vim-7.4.512/src/version.c	2014-11-12 16:10:44.258085148 +0100
Karsten Hopp 8bd20a
--- src/version.c	2014-11-12 17:06:37.443703083 +0100
Karsten Hopp 8bd20a
***************
Karsten Hopp 8bd20a
*** 743,744 ****
Karsten Hopp 8bd20a
--- 743,746 ----
Karsten Hopp 8bd20a
  {   /* Add new patch number below this line */
Karsten Hopp 8bd20a
+ /**/
Karsten Hopp 8bd20a
+     513,
Karsten Hopp 8bd20a
  /**/
Karsten Hopp 8bd20a
Karsten Hopp 8bd20a
-- 
Karsten Hopp 8bd20a
Save the plankton - eat a whale.
Karsten Hopp 8bd20a
Karsten Hopp 8bd20a
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 8bd20a
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 8bd20a
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 8bd20a
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///