Skip to content

Commit

Permalink
[CVE-2019-0649] Microsoft Chakra JIT server construct Caches array ou…
Browse files Browse the repository at this point in the history
…t-of-bounds
  • Loading branch information
MikeHolman committed Feb 7, 2019
1 parent fe64d93 commit beba75a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Backend/Func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1673,14 +1673,14 @@ Func::LinkCtorCacheToPropertyId(Js::PropertyId propertyId, JITTimeConstructorCac

JITTimeConstructorCache* Func::GetConstructorCache(const Js::ProfileId profiledCallSiteId)
{
Assert(profiledCallSiteId < GetJITFunctionBody()->GetProfiledCallSiteCount());
AssertOrFailFast(profiledCallSiteId < GetJITFunctionBody()->GetProfiledCallSiteCount());
Assert(this->constructorCaches != nullptr);
return this->constructorCaches[profiledCallSiteId];
}

void Func::SetConstructorCache(const Js::ProfileId profiledCallSiteId, JITTimeConstructorCache* constructorCache)
{
Assert(profiledCallSiteId < GetJITFunctionBody()->GetProfiledCallSiteCount());
AssertOrFailFast(profiledCallSiteId < GetJITFunctionBody()->GetProfiledCallSiteCount());
Assert(constructorCache != nullptr);
Assert(this->constructorCaches != nullptr);
Assert(this->constructorCaches[profiledCallSiteId] == nullptr);
Expand Down

0 comments on commit beba75a

Please sign in to comment.