Skip to content

Commit

Permalink
[CVE-2019-0922] Type confusion in Edge - Individual
Browse files Browse the repository at this point in the history
  • Loading branch information
Meghana Gupta authored and MikeHolman committed May 13, 2019
1 parent ea04913 commit a9ab1aa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Backend/GlobOptArrays.cpp
Expand Up @@ -1736,7 +1736,14 @@ void GlobOpt::ArraySrcOpt::Optimize()
{
if (newBaseValueType != baseValueType)
{
UpdateValue(nullptr, nullptr, nullptr);
if (globOpt->IsSafeToTransferInPrePass(baseOpnd, baseValue))
{
UpdateValue(nullptr, nullptr, nullptr);
}
else if (globOpt->IsOperationThatLikelyKillsJsArraysWithNoMissingValues(instr) && baseValueInfo->HasNoMissingValues())
{
globOpt->ChangeValueType(nullptr, baseValue, baseValueInfo->Type().SetHasNoMissingValues(false), true);
}
}

// For javascript arrays and objects with javascript arrays:
Expand Down

0 comments on commit a9ab1aa

Please sign in to comment.