diff --git a/agents/meshcore.js b/agents/meshcore.js index 7992b1c2..26d2c4ad 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -3906,6 +3906,7 @@ function linux_execv(name, agentfilename, sessionid) var i; var args; var argarr = [process.execPath]; + var argtmp = []; var path = require('_GenericMarshal').CreateVariable(process.execPath); if (require('MeshAgent').getStartupOptions != null) { @@ -3918,6 +3919,7 @@ function linux_execv(name, agentfilename, sessionid) args = require('_GenericMarshal').CreateVariable((1 + argarr.length) * require('_GenericMarshal').PointerSize); for (i = 0; i < argarr.length; ++i) { var arg = require('_GenericMarshal').CreateVariable(argarr[i]); + argtmp.push(arg); arg.pointerBuffer().copy(args.toBuffer(), i * require('_GenericMarshal').PointerSize); } @@ -3965,6 +3967,7 @@ function bsd_execv(name, agentfilename, sessionid) { var i; var path = require('_GenericMarshal').CreateVariable(process.execPath); var argarr = [process.execPath]; + var argtmp = []; var args; var options = require('MeshAgent').getStartupOptions(); for (i in options) { @@ -3973,6 +3976,7 @@ function bsd_execv(name, agentfilename, sessionid) { args = require('_GenericMarshal').CreateVariable((1 + argarr.length) * require('_GenericMarshal').PointerSize); for (i = 0; i < argarr.length; ++i) { var arg = require('_GenericMarshal').CreateVariable(argarr[i]); + argtmp.push(arg); arg.pointerBuffer().copy(args.toBuffer(), i * require('_GenericMarshal').PointerSize); } diff --git a/agents/recoverycore.js b/agents/recoverycore.js index e8c2a7bd..7934108d 100644 --- a/agents/recoverycore.js +++ b/agents/recoverycore.js @@ -237,6 +237,7 @@ function linux_execv(name, agentfilename, sessionid) var i; var args; + var argtmp = []; var argarr = [process.execPath]; var path = require('_GenericMarshal').CreateVariable(process.execPath); @@ -250,6 +251,7 @@ function linux_execv(name, agentfilename, sessionid) args = require('_GenericMarshal').CreateVariable((1 + argarr.length) * require('_GenericMarshal').PointerSize); for (i = 0; i < argarr.length; ++i) { var arg = require('_GenericMarshal').CreateVariable(argarr[i]); + argtmp.push(arg); arg.pointerBuffer().copy(args.toBuffer(), i * require('_GenericMarshal').PointerSize); } @@ -298,6 +300,7 @@ function bsd_execv(name, agentfilename, sessionid) { var i; var path = require('_GenericMarshal').CreateVariable(process.execPath); var argarr = [process.execPath]; + var argtmp = []; var args; var options = require('MeshAgent').getStartupOptions(); for (i in options) { @@ -306,6 +309,7 @@ function bsd_execv(name, agentfilename, sessionid) { args = require('_GenericMarshal').CreateVariable((1 + argarr.length) * require('_GenericMarshal').PointerSize); for (i = 0; i < argarr.length; ++i) { var arg = require('_GenericMarshal').CreateVariable(argarr[i]); + argtmp.push(arg); arg.pointerBuffer().copy(args.toBuffer(), i * require('_GenericMarshal').PointerSize); }