diff --git a/src/node.cc b/src/node.cc index eddd78619..17fc8ef12 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1648,7 +1648,7 @@ static void Load(int argc, char *argv[]) { // as a last ditch effort, fallback on argv[0] ? process->Set(String::NewSymbol("execPath"), String::New(argv[0])); } else { - process->Set(String::NewSymbol("execPath"), String::New(execPath)); + process->Set(String::NewSymbol("execPath"), String::New(execPath, size)); } diff --git a/src/platform_none.cc b/src/platform_none.cc index 420efe189..753fc038b 100644 --- a/src/platform_none.cc +++ b/src/platform_none.cc @@ -30,7 +30,7 @@ int OS::GetMemory(size_t *rss, size_t *vsize) { int OS::GetExecutablePath(char *buffer, size_t* size) { *size = 0; - return 0; + return -1; } } // namespace node