Skip to content

Commit

Permalink
[CVE-2017-11796] Don't reset envDepths for nested compiled functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sigatrev authored and agarwal-sandeep committed Oct 10, 2017
1 parent e2b35ab commit 6eba63d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Runtime/ByteCode/ByteCodeEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3481,7 +3481,7 @@ void ByteCodeGenerator::StartEmitFunction(ParseNode *pnodeFnc)

FuncInfo *funcInfo = pnodeFnc->sxFnc.funcInfo;

if (funcInfo->byteCodeFunction->IsFunctionParsed())
if (funcInfo->byteCodeFunction->IsFunctionParsed() && funcInfo->GetParsedFunctionBody()->GetByteCode() == nullptr)
{
if (!(flags & (fscrEval | fscrImplicitThis | fscrImplicitParents)))
{
Expand Down

0 comments on commit 6eba63d

Please # to comment.