Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
fix the bug of CHECKMULTISIG
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Zhang committed Dec 18, 2017
1 parent 00412c9 commit cb1c4c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/neo-vm/ExecutionEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ private void ExecuteOp(OpCode opcode, ExecutionContext context)
else
{
n = (int)item.GetBigInteger();
if (n < 1)
if (n < 1 || n > EvaluationStack.Count)
{
State |= VMState.FAULT;
return;
Expand All @@ -631,7 +631,7 @@ private void ExecuteOp(OpCode opcode, ExecutionContext context)
else
{
m = (int)item.GetBigInteger();
if (m < 1 || m > n)
if (m < 1 || m > n || m > EvaluationStack.Count)
{
State |= VMState.FAULT;
return;
Expand Down

0 comments on commit cb1c4c9

Please sign in to comment.