1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* win32/win32.c (CreateChild): allocate temporary buffer and use it

instead of directly modify the passed string.  [ruby-dev:39635]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2009-11-05 02:33:14 +00:00
parent a41271104b
commit e9f4ba613e
2 changed files with 12 additions and 5 deletions

View file

@ -1,3 +1,8 @@
Thu Nov 5 11:31:23 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (CreateChild): allocate temporary buffer and use it
instead of directly modify the passed string. [ruby-dev:39635]
Sat Oct 31 17:20:58 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org> Sat Oct 31 17:20:58 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* lib/net/http.rb (Net::HTTPResponse#each_response_header): * lib/net/http.rb (Net::HTTPResponse#each_response_header):

View file

@ -1091,11 +1091,13 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa,
} }
} }
if (p) { if (p) {
shell = p; char *tmp = ALLOCA_N(char, strlen(p) + 1);
while (*p) { strcpy(tmp, p);
if ((unsigned char)*p == '/') shell = tmp;
*p = '\\'; while (*tmp) {
p = CharNext(p); if ((unsigned char)*tmp == '/')
*tmp = '\\';
tmp = CharNext(tmp);
} }
} }