Skip to content

Commit

Permalink
[CVE-2017-11914] JavascriptGeneratorFunction::GetPropertyBuiltIns exp…
Browse files Browse the repository at this point in the history
…oses scriptFunction - Google, Inc.

While trying to get the length property pass the generator function as this not the inner script function.
  • Loading branch information
aneeshdk authored and MikeHolman committed Dec 7, 2017
1 parent 39eecff commit b488088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Runtime/Library/JavascriptGeneratorFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ namespace Js
// to get the length from our private ScriptFunction instead of ourself.
int len = 0;
Var varLength;
if (scriptFunction->GetProperty(scriptFunction, PropertyIds::length, &varLength, NULL, requestContext))
if (scriptFunction->GetProperty(this, PropertyIds::length, &varLength, NULL, requestContext))
{
len = JavascriptConversion::ToInt32(varLength, requestContext);
}
Expand Down

0 comments on commit b488088

Please sign in to comment.