81c2858
To: vim-dev@vim.org
81c2858
Subject: Patch 7.2.214
81c2858
Fcc: outbox
81c2858
From: Bram Moolenaar <Bram@moolenaar.net>
81c2858
Mime-Version: 1.0
81c2858
Content-Type: text/plain; charset=UTF-8
81c2858
Content-Transfer-Encoding: 8bit
81c2858
------------
81c2858
81c2858
Patch 7.2.214
81c2858
Problem:    Crash with complete function for user command. (Andy Wokula)
81c2858
Solution:   Avoid using a NULL pointer (Dominique Pelle)
81c2858
Files:	    src/ex_getln.c
81c2858
81c2858
81c2858
*** ../vim-7.2.213/src/ex_getln.c	2009-05-16 17:29:37.000000000 +0200
81c2858
--- src/ex_getln.c	2009-06-24 16:57:28.000000000 +0200
81c2858
***************
81c2858
*** 4874,4887 ****
81c2858
      /* Loop over the items in the list. */
81c2858
      for (li = retlist->lv_first; li != NULL; li = li->li_next)
81c2858
      {
81c2858
! 	if (li->li_tv.v_type != VAR_STRING)
81c2858
! 	    continue;  /* Skip non-string items */
81c2858
  
81c2858
  	if (ga_grow(&ga, 1) == FAIL)
81c2858
  	    break;
81c2858
  
81c2858
  	((char_u **)ga.ga_data)[ga.ga_len] =
81c2858
! 	    vim_strsave(li->li_tv.vval.v_string);
81c2858
  	++ga.ga_len;
81c2858
      }
81c2858
      list_unref(retlist);
81c2858
--- 4874,4887 ----
81c2858
      /* Loop over the items in the list. */
81c2858
      for (li = retlist->lv_first; li != NULL; li = li->li_next)
81c2858
      {
81c2858
! 	if (li->li_tv.v_type != VAR_STRING || li->li_tv.vval.v_string == NULL)
81c2858
! 	    continue;  /* Skip non-string items and empty strings */
81c2858
  
81c2858
  	if (ga_grow(&ga, 1) == FAIL)
81c2858
  	    break;
81c2858
  
81c2858
  	((char_u **)ga.ga_data)[ga.ga_len] =
81c2858
! 					 vim_strsave(li->li_tv.vval.v_string);
81c2858
  	++ga.ga_len;
81c2858
      }
81c2858
      list_unref(retlist);
81c2858
*** ../vim-7.2.213/src/version.c	2009-06-24 16:49:50.000000000 +0200
81c2858
--- src/version.c	2009-06-24 17:03:58.000000000 +0200
81c2858
***************
81c2858
*** 678,679 ****
81c2858
--- 678,681 ----
81c2858
  {   /* Add new patch number below this line */
81c2858
+ /**/
81c2858
+     214,
81c2858
  /**/
81c2858
81c2858
-- 
81c2858
He who laughs last, thinks slowest.
81c2858
81c2858
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
81c2858
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
81c2858
\\\        download, build and distribute -- http://www.A-A-P.org        ///
81c2858
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///