From a4ef2bbdd1e3564e0440ac3feb90bf00d36be3ac Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 5 Jun 2012 20:29:15 +0000 Subject: * process.c (rb_exec_fillarg): check use_shell field before accessing a union field. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ process.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b2ab28bdb8..0c7146b0d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 6 05:27:54 2012 Tanaka Akira + + * process.c (rb_exec_fillarg): check use_shell field before accessing + a union field. + Wed Jun 6 04:58:44 2012 Tanaka Akira * process.c (rb_spawn_process): prog variable is not used for Unix. diff --git a/process.c b/process.c index d4f090f9a4..eb0c3a2a3c 100644 --- a/process.c +++ b/process.c @@ -1830,7 +1830,7 @@ rb_exec_fillarg(VALUE prog, int argc, VALUE *argv, VALUE env, VALUE opthash, str e->invoke.cmd.argv_buf = argv_buf; } - if (e->invoke.cmd.argv_buf) { + if (!e->use_shell) { char *p, *ep, *null=NULL; VALUE argv_str; argv_str = hide_obj(rb_str_buf_new(sizeof(char*) * (argc + 2))); -- cgit v1.2.3