1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-12 06:13:43 +00:00

Fixed bug with IOActive change that causes crash during windows self update

This commit is contained in:
Bryan Roe
2020-10-16 15:48:36 -07:00
parent a2892996fb
commit f5906fac77
3 changed files with 8 additions and 7 deletions

View File

@@ -1839,7 +1839,7 @@ End Mesh Agent Duktape Abstraction
char* MeshAgent_MakeAbsolutePath(char *basePath, char *localPath) char* MeshAgent_MakeAbsolutePath(char *basePath, char *localPath)
{ {
MeshAgentHostContainer *agent = ILibMemory_CanaryOK(basePath) ? ((MeshAgentHostContainer**)ILibMemory_Extra(basePath))[0] : NULL; MeshAgentHostContainer *agent = ILibMemory_CanaryOK(basePath) ? ((MeshAgentHostContainer**)ILibMemory_Extra(basePath))[0] : NULL;
duk_context *ctx = (agent != NULL && agent->meshCoreCtx != NULL) ? agent->meshCoreCtx : ILibDuktape_ScriptContainer_InitializeJavaScriptEngineEx(0, 0, agent->chain, NULL, NULL, agent->exePath, NULL, NULL, agent->chain); duk_context *ctx = (agent != NULL && agent->meshCoreCtx != NULL) ? agent->meshCoreCtx : ILibDuktape_ScriptContainer_InitializeJavaScriptEngineEx(SCRIPT_ENGINE_NONE, 0, agent->chain, NULL, NULL, agent->exePath, NULL, NULL, agent->chain);
if (duk_peval_string(ctx, "require('util-pathHelper');") == 0) // [helper] if (duk_peval_string(ctx, "require('util-pathHelper');") == 0) // [helper]
{ {

View File

@@ -120,6 +120,7 @@ typedef enum SCRIPT_ENGINE_SECURITY_FLAGS
SCRIPT_ENGINE_NO_PROCESS_SPAWNING = 0x04000000, SCRIPT_ENGINE_NO_PROCESS_SPAWNING = 0x04000000,
SCRIPT_ENGINE_NO_FILE_SYSTEM_ACCESS = 0x00000001, SCRIPT_ENGINE_NO_FILE_SYSTEM_ACCESS = 0x00000001,
SCRIPT_ENGINE_NO_NETWORK_ACCESS = 0x00000002, SCRIPT_ENGINE_NO_NETWORK_ACCESS = 0x00000002,
SCRIPT_ENGINE_NONE = 0xFFFFFFFF
}SCRIPT_ENGINE_SECURITY_FLAGS; }SCRIPT_ENGINE_SECURITY_FLAGS;
typedef struct SCRIPT_ENGINE_SETTINGS typedef struct SCRIPT_ENGINE_SETTINGS

View File

@@ -10540,8 +10540,8 @@ char* ILibToHex(char* data, int len, char* out)
*/ */
int ILibIsRunningOnChainThread(void* chain) int ILibIsRunningOnChainThread(void* chain)
{ {
if (chain == NULL) { return(1); }
struct ILibBaseChain* c = (struct ILibBaseChain*)chain; struct ILibBaseChain* c = (struct ILibBaseChain*)chain;
#if defined(WIN32) #if defined(WIN32)
return(c->ChainThreadID == 0 || c->ChainThreadID == GetCurrentThreadId()); return(c->ChainThreadID == 0 || c->ChainThreadID == GetCurrentThreadId());
#else #else