Skip to content

Commit

Permalink
Compiler::lookupHWIntrinsic: fix oob read (dotnet#16075)
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Baladurin authored and janvorli committed Jan 30, 2018
1 parent efebb38 commit 6fc5158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jit/hwintrinsicxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ NamedIntrinsic Compiler::lookupHWIntrinsic(const char* methodName, InstructionSe
NamedIntrinsic result = NI_Illegal;
if (isa != InstructionSet_ILLEGAL)
{
for (int i = 0; i < NI_HW_INTRINSIC_END - NI_HW_INTRINSIC_START; i++)
for (int i = 0; i < NI_HW_INTRINSIC_END - NI_HW_INTRINSIC_START - 1; i++)
{
if (isa == hwIntrinsicInfoArray[i].isa && strcmp(methodName, hwIntrinsicInfoArray[i].intrinsicName) == 0)
{
Expand Down

0 comments on commit 6fc5158

Please sign in to comment.