ruby-changes:19025
From: usa <ko1@a...>
Date: Tue, 8 Mar 2011 16:52:34 +0900 (JST)
Subject: [ruby-changes:19025] Ruby:r31063 (trunk): * hash.c (ruby_setenv): MSDN says that Windows XP or earlier limits
usa 2011-03-08 16:52:19 +0900 (Tue, 08 Mar 2011) New Revision: 31063 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31063 Log: * hash.c (ruby_setenv): MSDN says that Windows XP or earlier limits the total size of environment block to 5,120 chars. and on such OS, putenv() causes SEGV. So, ruby should limit the size of an environment variable to 5,120 bytes for workaround. Modified files: trunk/ChangeLog trunk/hash.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31062) +++ ChangeLog (revision 31063) @@ -1,3 +1,10 @@ +Tue Mar 8 16:45:31 2011 NAKAMURA Usaku <usa@r...> + + * hash.c (ruby_setenv): MSDN says that Windows XP or earlier limits + the total size of environment block to 5,120 chars. and on such + OS, putenv() causes SEGV. So, ruby should limit the size of an + environment variable to 5,120 bytes for workaround. + Tue Mar 8 15:57:20 2011 NAKAMURA Usaku <usa@r...> * test/rubygems/test_gem_spec_fetcher.rb Index: hash.c =================================================================== --- hash.c (revision 31062) +++ hash.c (revision 31063) @@ -2206,6 +2206,7 @@ rb_sys_fail("ruby_setenv"); } if (value) { + if (strlen(value) > 5120) goto fail; buf = rb_sprintf("%s=%s", name, value); } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/