Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit 7173fd2

Browse files
boopeshmahendrannethip
authored andcommitted
Null terminate the bracketsDirPath (#623)
1 parent f83b907 commit 7173fd2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

appshell/appshell_node_process_linux.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ void* nodeThread(void* unused) {
9393
// strip off trailing executable name
9494
char* lastIndexOf = strrchr(executablePath, '/');
9595
memcpy(bracketsDirPath, executablePath, lastIndexOf - executablePath + 1);
96+
97+
// null terminate the string
98+
bracketsDirPath[lastIndexOf - executablePath + 1] = '\0';
9699

97100
// create node exec and node-core paths
98101
strcpy(nodeExecutablePath, bracketsDirPath);

0 commit comments

Comments
 (0)