Check makerFeeAssetData length before attempting to read id

This commit is contained in:
Amir Bandeali 2020-01-02 15:21:34 -08:00 committed by Amir
parent 27d09713fd
commit b0aa5d3af2
2 changed files with 2 additions and 2 deletions

View File

@ -492,6 +492,6 @@ contract MixinExchangeWrapper is
pure
returns (bool)
{
return order.makerFeeAssetData.readBytes4(0) == EXCHANGE_V2_ORDER_ID;
return order.makerFeeAssetData.length > 3 && order.makerFeeAssetData.readBytes4(0) == EXCHANGE_V2_ORDER_ID;
}
}

View File

@ -7897,7 +7897,7 @@ ganache-cli@6.8.0-istanbul.0:
source-map-support "0.5.12"
yargs "13.2.4"
ganache-core@2.9.0-istanbul.0, ganache-core@^2.9.0-istanbul.0:
ganache-core@^2.9.0-istanbul.0:
version "2.9.0-istanbul.0"
resolved "https://registry.npmjs.org/ganache-core/-/ganache-core-2.9.0-istanbul.0.tgz#bc336c770775a2b9fb06f5cae827088ecc194283"
integrity sha512-wqNWyxrfZe4QPxzaR/n4hGxIfa1iZAkymPg17wET0iWZ9uurMywGgpG4ZvxjVU9q7WCjIobOSzE1m9OT0dIYcQ==