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