diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-03 02:16:42 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-03 02:16:42 +0000 |
commit | 396e3da75d6058199f0e84cdb0f64d44c1a4e1ff (patch) | |
tree | b41f4c87560b57d0dab759532c51fc11b8a53ff7 | |
parent | 655285b5f702e6bdb1e99b4702719b030340acea (diff) | |
download | ruby-396e3da75d6058199f0e84cdb0f64d44c1a4e1ff.tar.gz |
* 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/trunk@48690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | win32/win32.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Wed Dec 3 11:14:14 2014 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 Dec 3 09:48:57 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/racc/cparse/cparse.c (cparse_params_type): use typed data. diff --git a/win32/win32.c b/win32/win32.c index 949e918bd0..dc0232b237 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1321,9 +1321,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) { |