diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-17 17:42:46 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-17 17:42:46 +0000 |
commit | c7edfc37fff5a1b6636e6582a882419cc32942c9 (patch) | |
tree | 52317c26cbc2b9edf9e7c1717ead68e81fb2843a | |
parent | 7cd92ce49a6d5474361190248e7caed176fae743 (diff) | |
download | ruby-c7edfc37fff5a1b6636e6582a882419cc32942c9.tar.gz |
merge revision(s) r48690: [Backport #10563]
* win32/win32.c (w32_spawn): `v2` is used not only for `shell` but also
`cmd`, so must not free before using `cmd`.
[ruby-core:66648] [Bug #10563]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@49997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | version.h | 2 | ||||
-rw-r--r-- | win32/win32.c | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Wed Mar 18 02:42:37 2015 NAKAMURA Usaku <usa@ruby-lang.org> + + * win32/win32.c (w32_spawn): `v2` is used not only for `shell` but also + `cmd`, so must not free before using `cmd`. + [ruby-core:66648] [Bug #10563] + Wed Mar 18 02:40:18 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * win32/win32.c (constat_reset): do nothing on non-standard @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.1.5" #define RUBY_RELEASE_DATE "2015-03-18" -#define RUBY_PATCHLEVEL 318 +#define RUBY_PATCHLEVEL 319 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 3 diff --git a/win32/win32.c b/win32/win32.c index b9f52a9294..1f56f43d6b 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1320,9 +1320,9 @@ w32_spawn(int mode, const char *cmd, const char *prog, UINT cp) } if (!e && shell && !(wshell = mbstr_to_wstr(cp, shell, -1, NULL))) e = E2BIG; - if (v2) ALLOCV_END(v2); if (cmd_sep) *cmd_sep = sep; if (!e && cmd && !(wcmd = mbstr_to_wstr(cp, cmd, -1, NULL))) e = E2BIG; + if (v2) ALLOCV_END(v2); if (v) ALLOCV_END(v); if (!e) { |