From 1e07fcacacd760ce3dee1e70597ef2ffd2847daa Mon Sep 17 00:00:00 2001 From: Remco Bloemen Date: Fri, 23 Feb 2018 15:13:18 -0800 Subject: Verify length on EIP712 signatures --- .../contracts/current/protocol/Exchange/MixinSignatureValidator.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol index 91e788763..2d04c7c6d 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol @@ -96,9 +96,10 @@ contract MixinSignatureValidator is ); isValid = signer == recovered; return isValid; - + // Signature using EIP712 } else if (signatureType == SignatureType.EIP712) { + require(signature.length == 66); v = uint8(signature[1]); r = get32(signature, 2); s = get32(signature, 34); -- cgit