3c512f1
To: vim-dev@vim.org
3c512f1
Subject: Patch 7.2.382
3c512f1
Fcc: outbox
3c512f1
From: Bram Moolenaar <Bram@moolenaar.net>
3c512f1
Mime-Version: 1.0
3c512f1
Content-Type: text/plain; charset=UTF-8
3c512f1
Content-Transfer-Encoding: 8bit
3c512f1
------------
3c512f1
3c512f1
Patch 7.2.382
3c512f1
Problem:    Accessing freed memory when closing the cmdline window when
3c512f1
	    'bufhide' is set to "wipe".
3c512f1
Solution:   Check if the buffer still exists before invoking close_buffer()
3c512f1
	    (Dominique Pelle)
3c512f1
Files:	    src/ex_getln.c
3c512f1
3c512f1
3c512f1
*** ../vim-7.2.381/src/ex_getln.c	2010-03-02 15:55:51.000000000 +0100
3c512f1
--- src/ex_getln.c	2010-03-02 16:29:38.000000000 +0100
3c512f1
***************
3c512f1
*** 6252,6258 ****
3c512f1
  	bp = curbuf;
3c512f1
  	win_goto(old_curwin);
3c512f1
  	win_close(wp, TRUE);
3c512f1
! 	close_buffer(NULL, bp, DOBUF_WIPE);
3c512f1
  
3c512f1
  	/* Restore window sizes. */
3c512f1
  	win_size_restore(&winsizes);
3c512f1
--- 6252,6262 ----
3c512f1
  	bp = curbuf;
3c512f1
  	win_goto(old_curwin);
3c512f1
  	win_close(wp, TRUE);
3c512f1
! 
3c512f1
! 	/* win_close() may have already wiped the buffer when 'bh' is
3c512f1
! 	 * set to 'wipe' */
3c512f1
! 	if (buf_valid(bp))
3c512f1
! 	    close_buffer(NULL, bp, DOBUF_WIPE);
3c512f1
  
3c512f1
  	/* Restore window sizes. */
3c512f1
  	win_size_restore(&winsizes);
3c512f1
*** ../vim-7.2.381/src/version.c	2010-03-02 15:55:51.000000000 +0100
3c512f1
--- src/version.c	2010-03-02 17:22:11.000000000 +0100
3c512f1
***************
3c512f1
*** 683,684 ****
3c512f1
--- 683,686 ----
3c512f1
  {   /* Add new patch number below this line */
3c512f1
+ /**/
3c512f1
+     382,
3c512f1
  /**/
3c512f1
3c512f1
-- 
3c512f1
You had connectors?  Eeee, when I were a lad we 'ad to carry the
3c512f1
bits between the computer and the terminal with a spoon...
3c512f1
3c512f1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3c512f1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3c512f1
\\\        download, build and distribute -- http://www.A-A-P.org        ///
3c512f1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///