Karsten Hopp dbebb1
To: vim-dev@vim.org
Karsten Hopp dbebb1
Subject: patch 7.1.011
Karsten Hopp dbebb1
Fcc: outbox
Karsten Hopp dbebb1
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp dbebb1
Mime-Version: 1.0
Karsten Hopp dbebb1
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp dbebb1
Content-Transfer-Encoding: 8bit
Karsten Hopp dbebb1
------------
Karsten Hopp dbebb1
Karsten Hopp dbebb1
Patch 7.1.011
Karsten Hopp dbebb1
Problem:    Possible buffer overflow when $VIMRUNTIME is very long. (Victor
Karsten Hopp dbebb1
	    Stinner)
Karsten Hopp dbebb1
Solution:   Use vim_snprintf().
Karsten Hopp dbebb1
Files:	    src/main.c
Karsten Hopp dbebb1
Karsten Hopp dbebb1
Karsten Hopp dbebb1
*** ../vim-7.1.010/src/main.c	Thu May 10 21:12:25 2007
Karsten Hopp dbebb1
--- src/main.c	Sat Jun  9 22:37:46 2007
Karsten Hopp dbebb1
***************
Karsten Hopp dbebb1
*** 1360,1367 ****
Karsten Hopp dbebb1
  	p = vim_getenv((char_u *)"VIMRUNTIME", &mustfree);
Karsten Hopp dbebb1
  	if (p != NULL && *p != NUL)
Karsten Hopp dbebb1
  	{
Karsten Hopp dbebb1
! 	    STRCPY(NameBuff, p);
Karsten Hopp dbebb1
! 	    STRCAT(NameBuff, "/lang");
Karsten Hopp dbebb1
  	    bindtextdomain(VIMPACKAGE, (char *)NameBuff);
Karsten Hopp dbebb1
  	}
Karsten Hopp dbebb1
  	if (mustfree)
Karsten Hopp dbebb1
--- 1360,1366 ----
Karsten Hopp dbebb1
  	p = vim_getenv((char_u *)"VIMRUNTIME", &mustfree);
Karsten Hopp dbebb1
  	if (p != NULL && *p != NUL)
Karsten Hopp dbebb1
  	{
Karsten Hopp dbebb1
! 	    vim_snprintf((char *)NameBuff, MAXPATHL, "%s/lang", p);
Karsten Hopp dbebb1
  	    bindtextdomain(VIMPACKAGE, (char *)NameBuff);
Karsten Hopp dbebb1
  	}
Karsten Hopp dbebb1
  	if (mustfree)
Karsten Hopp dbebb1
*** ../vim-7.1.010/src/version.c	Tue Jun 19 18:07:52 2007
Karsten Hopp dbebb1
--- src/version.c	Tue Jun 19 20:29:44 2007
Karsten Hopp dbebb1
***************
Karsten Hopp dbebb1
*** 668,669 ****
Karsten Hopp dbebb1
--- 668,671 ----
Karsten Hopp dbebb1
  {   /* Add new patch number below this line */
Karsten Hopp dbebb1
+ /**/
Karsten Hopp dbebb1
+     11,
Karsten Hopp dbebb1
  /**/
Karsten Hopp dbebb1
Karsten Hopp dbebb1
-- 
Karsten Hopp dbebb1
   GALAHAD hurries to the door and pushes through it.  As he leaves the room
Karsten Hopp dbebb1
   we CUT TO the reverse to show that he is now in a room full of bathing
Karsten Hopp dbebb1
   and romping GIRLIES, all innocent, wide-eyed and beautiful.  They smile
Karsten Hopp dbebb1
   enchantingly at him as he tries to keep walking without being diverted by
Karsten Hopp dbebb1
   the lovely sights assaulting his eyeballs.
Karsten Hopp dbebb1
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp dbebb1
Karsten Hopp dbebb1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp dbebb1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp dbebb1
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp dbebb1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///