[前][次][番号順一覧][スレッド一覧]

ruby-changes:36609

From: usa <ko1@a...>
Date: Wed, 3 Dec 2014 11:16:49 +0900 (JST)
Subject: [ruby-changes:36609] usa:r48690 (trunk): * win32/win32.c (w32_spawn): `v2` is used not only for `shell` but also

usa	2014-12-03 11:16:42 +0900 (Wed, 03 Dec 2014)

  New Revision: 48690

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48690

  Log:
    * 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]

  Modified files:
    trunk/ChangeLog
    trunk/win32/win32.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48689)
+++ ChangeLog	(revision 48690)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Dec  3 11:14:14 2014  NAKAMURA Usaku  <usa@r...>
+
+	* 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@r...>
 
 	* ext/racc/cparse/cparse.c (cparse_params_type): use typed data.
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 48689)
+++ win32/win32.c	(revision 48690)
@@ -1321,9 +1321,9 @@ w32_spawn(int mode, const char *cmd, con https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L1321
     }
 
     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) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]