mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d504a2458c
commit
45f59656ae
2 changed files with 8 additions and 0 deletions
|
|
@ -1,3 +1,10 @@
|
|||
Tue Mar 8 16:45:31 2011 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* test/rubygems/test_gem_spec_fetcher.rb
|
||||
|
|
|
|||
1
hash.c
1
hash.c
|
|
@ -2206,6 +2206,7 @@ ruby_setenv(const char *name, const char *value)
|
|||
rb_sys_fail("ruby_setenv");
|
||||
}
|
||||
if (value) {
|
||||
if (strlen(value) > 5120) goto fail;
|
||||
buf = rb_sprintf("%s=%s", name, value);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue