Karsten Hopp 9941f6
To: vim-dev@vim.org
Karsten Hopp 9941f6
Subject: Patch 7.2.438
Karsten Hopp 9941f6
Fcc: outbox
Karsten Hopp 9941f6
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 9941f6
Mime-Version: 1.0
Karsten Hopp 9941f6
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 9941f6
Content-Transfer-Encoding: 8bit
Karsten Hopp 9941f6
------------
Karsten Hopp 9941f6
Karsten Hopp 9941f6
Patch 7.2.438 (after 7.2.427)
Karsten Hopp 9941f6
Problem:    "vim -r" crashes.
Karsten Hopp 9941f6
Solution:   Don't use NULL pointer argument.
Karsten Hopp 9941f6
Files:	    src/memline.c
Karsten Hopp 9941f6
Karsten Hopp 9941f6
Karsten Hopp 9941f6
*** ../vim-7.2.437/src/memline.c	2010-05-14 17:52:35.000000000 +0200
Karsten Hopp 9941f6
--- src/memline.c	2010-05-25 21:36:01.000000000 +0200
Karsten Hopp 9941f6
***************
Karsten Hopp 9941f6
*** 1404,1418 ****
Karsten Hopp 9941f6
      int		i;
Karsten Hopp 9941f6
      char_u	*dirp;
Karsten Hopp 9941f6
      char_u	*dir_name;
Karsten Hopp 9941f6
!     char_u	*fname_res = *fname;
Karsten Hopp 9941f6
  #ifdef HAVE_READLINK
Karsten Hopp 9941f6
      char_u	fname_buf[MAXPATHL];
Karsten Hopp 9941f6
  
Karsten Hopp 9941f6
      /* Expand symlink in the file name, because the swap file is created with
Karsten Hopp 9941f6
       * the actual file instead of with the symlink. */
Karsten Hopp 9941f6
      if (resolve_symlink(*fname, fname_buf) == OK)
Karsten Hopp 9941f6
  	fname_res = fname_buf;
Karsten Hopp 9941f6
  #endif
Karsten Hopp 9941f6
  
Karsten Hopp 9941f6
      if (list)
Karsten Hopp 9941f6
      {
Karsten Hopp 9941f6
--- 1404,1425 ----
Karsten Hopp 9941f6
      int		i;
Karsten Hopp 9941f6
      char_u	*dirp;
Karsten Hopp 9941f6
      char_u	*dir_name;
Karsten Hopp 9941f6
!     char_u	*fname_res = NULL;
Karsten Hopp 9941f6
  #ifdef HAVE_READLINK
Karsten Hopp 9941f6
      char_u	fname_buf[MAXPATHL];
Karsten Hopp 9941f6
+ #endif
Karsten Hopp 9941f6
  
Karsten Hopp 9941f6
+     if (fname != NULL)
Karsten Hopp 9941f6
+     {
Karsten Hopp 9941f6
+ #ifdef HAVE_READLINK
Karsten Hopp 9941f6
      /* Expand symlink in the file name, because the swap file is created with
Karsten Hopp 9941f6
       * the actual file instead of with the symlink. */
Karsten Hopp 9941f6
      if (resolve_symlink(*fname, fname_buf) == OK)
Karsten Hopp 9941f6
  	fname_res = fname_buf;
Karsten Hopp 9941f6
+     else
Karsten Hopp 9941f6
  #endif
Karsten Hopp 9941f6
+ 	fname_res = *fname;
Karsten Hopp 9941f6
+     }
Karsten Hopp 9941f6
  
Karsten Hopp 9941f6
      if (list)
Karsten Hopp 9941f6
      {
Karsten Hopp 9941f6
*** ../vim-7.2.437/src/version.c	2010-05-21 13:08:51.000000000 +0200
Karsten Hopp 9941f6
--- src/version.c	2010-05-25 21:30:12.000000000 +0200
Karsten Hopp 9941f6
***************
Karsten Hopp 9941f6
*** 683,684 ****
Karsten Hopp 9941f6
--- 683,686 ----
Karsten Hopp 9941f6
  {   /* Add new patch number below this line */
Karsten Hopp 9941f6
+ /**/
Karsten Hopp 9941f6
+     438,
Karsten Hopp 9941f6
  /**/
Karsten Hopp 9941f6
Karsten Hopp 9941f6
-- 
Karsten Hopp 9941f6
A fool learns from his mistakes, a wise man from someone else's.
Karsten Hopp 9941f6
Karsten Hopp 9941f6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 9941f6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 9941f6
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 9941f6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///