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