Add note about input validation

This commit is contained in:
Amir Bandeali 2018-12-19 11:27:10 -08:00
parent 2a2260de45
commit 04729c44b4

View File

@ -33,6 +33,9 @@ contract MultiAssetProxy is
function ()
external
{
// NOTE: The below assembly assumes that clients do some input validation and that the input is properly encoded according to the AbiV2 specification.
// It is technically possible for inputs with very large lengths and offsets to cause overflows. However, this would make the calldata prohibitively expensive
// and we therefore do not check for overflows in these scenarios.
assembly {
// The first 4 bytes of calldata holds the function selector
let selector := and(calldataload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)