Skip to content

Commit

Permalink
[CVE-2018-0873] Scripting Engine Out-Of-Bounds Read Information Discl…
Browse files Browse the repository at this point in the history
…osure - Individual

We should be updating the fullname length once we have concatenated strings.
  • Loading branch information
akroshg committed Mar 12, 2018
1 parent 63a49d8 commit 024353a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/Parser/Parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7656,7 +7656,7 @@ LPCOLESTR Parser::ConstructFinalHintNode(IdentPtr pClassName, IdentPtr pMemberNa
}

LPCOLESTR pFinalName = isComputedName? pMemberNameHint : pMemberName->Psz();
uint32 fullNameHintLength = 0;
uint32 fullNameHintLength = (uint32)wcslen(pFinalName);
uint32 shortNameOffset = 0;
if (!isStatic)
{
Expand Down Expand Up @@ -7686,15 +7686,9 @@ LPCOLESTR Parser::ConstructFinalHintNode(IdentPtr pClassName, IdentPtr pMemberNa
}

}
if (fullNameHintLength > *nameLength)
{
*nameLength = fullNameHintLength;
}

if (shortNameOffset > *pShortNameOffset)
{
*pShortNameOffset = shortNameOffset;
}
*nameLength = fullNameHintLength;
*pShortNameOffset = shortNameOffset;

return pFinalName;
}
Expand Down

0 comments on commit 024353a

Please sign in to comment.