b29b70a
To: vim-dev@vim.org
b29b70a
Subject: Patch 7.2.250 (extra)
b29b70a
Fcc: outbox
b29b70a
From: Bram Moolenaar <Bram@moolenaar.net>
b29b70a
Mime-Version: 1.0
b29b70a
Content-Type: text/plain; charset=UTF-8
b29b70a
Content-Transfer-Encoding: 8bit
b29b70a
------------
b29b70a
b29b70a
Patch 7.2.250 (extra)
b29b70a
Problem:    Possible buffer overflow.
b29b70a
Solution:   Compute the remaining space. (Dominique Pelle)
b29b70a
Files:	    src/GvimExt/gvimext.cpp
b29b70a
b29b70a
b29b70a
*** ../vim-7.2.249/src/GvimExt/gvimext.cpp	2008-07-24 20:51:11.000000000 +0200
b29b70a
--- src/GvimExt/gvimext.cpp	2009-09-11 13:26:27.000000000 +0200
b29b70a
***************
b29b70a
*** 635,641 ****
b29b70a
  	}
b29b70a
  	// Now concatenate
b29b70a
  	strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1);
b29b70a
! 	strncat(temp, title, BUFSIZE - 1);
b29b70a
  	InsertMenu(hMenu,
b29b70a
  		indexMenu++,
b29b70a
  		MF_STRING|MF_BYPOSITION,
b29b70a
--- 635,643 ----
b29b70a
  	}
b29b70a
  	// Now concatenate
b29b70a
  	strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1);
b29b70a
! 	temp[BUFSIZE - 1] = '\0';
b29b70a
! 	strncat(temp, title, BUFSIZE - 1 - strlen(temp));
b29b70a
! 	temp[BUFSIZE - 1] = '\0';
b29b70a
  	InsertMenu(hMenu,
b29b70a
  		indexMenu++,
b29b70a
  		MF_STRING|MF_BYPOSITION,
b29b70a
*** ../vim-7.2.249/src/version.c	2009-09-11 12:59:57.000000000 +0200
b29b70a
--- src/version.c	2009-09-11 13:23:45.000000000 +0200
b29b70a
***************
b29b70a
*** 678,679 ****
b29b70a
--- 678,681 ----
b29b70a
  {   /* Add new patch number below this line */
b29b70a
+ /**/
b29b70a
+     250,
b29b70a
  /**/
b29b70a
b29b70a
b29b70a
-- 
b29b70a
hundred-and-one symptoms of being an internet addict:
b29b70a
223. You set up a web-cam as your home's security system.
b29b70a
b29b70a
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
b29b70a
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
b29b70a
\\\        download, build and distribute -- http://www.A-A-P.org        ///
b29b70a
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///