mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Check values of getenv() for validity
Signed-off-by: Ryan Choi <ryan.h.choi@gmail.com>
This commit is contained in:
parent
25588dcb01
commit
99b2d0f8ce
4 changed files with 11 additions and 5 deletions
|
|
@ -273,7 +273,8 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScript(StringView s
|
|||
|
||||
// dump Code Block
|
||||
#ifndef NDEBUG
|
||||
if (getenv("DUMP_CODEBLOCK_TREE") && strlen(getenv("DUMP_CODEBLOCK_TREE"))) {
|
||||
char* dumpCodeBlockTreeValue = getenv("DUMP_CODEBLOCK_TREE");
|
||||
if (dumpCodeBlockTreeValue && (strcmp(dumpCodeBlockTreeValue, "1") == 0)) {
|
||||
dumpCodeBlockTree(topCodeBlock);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -420,7 +421,8 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScriptWithDebugger(
|
|||
|
||||
// dump Code Block
|
||||
#ifndef NDEBUG
|
||||
if (getenv("DUMP_CODEBLOCK_TREE") && strlen(getenv("DUMP_CODEBLOCK_TREE"))) {
|
||||
char* dumpCodeBlockTreeValue = getenv("DUMP_CODEBLOCK_TREE");
|
||||
if (dumpCodeBlockTreeValue && (strcmp(dumpCodeBlockTreeValue, "1") == 0)) {
|
||||
dumpCodeBlockTree(topCodeBlock);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue