aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorRemco Bloemen <remco@wicked.ventures>2018-02-24 07:13:18 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:16 +0800
commit1e07fcacacd760ce3dee1e70597ef2ffd2847daa (patch)
treea1e9ca32a5e121096996d14e6fdb4286de681b94 /packages/contracts
parent69ab913bc6e155042af5fb2b2f0b740cd1d2399c (diff)
downloaddexon-sol-tools-1e07fcacacd760ce3dee1e70597ef2ffd2847daa.tar
dexon-sol-tools-1e07fcacacd760ce3dee1e70597ef2ffd2847daa.tar.gz
dexon-sol-tools-1e07fcacacd760ce3dee1e70597ef2ffd2847daa.tar.bz2
dexon-sol-tools-1e07fcacacd760ce3dee1e70597ef2ffd2847daa.tar.lz
dexon-sol-tools-1e07fcacacd760ce3dee1e70597ef2ffd2847daa.tar.xz
dexon-sol-tools-1e07fcacacd760ce3dee1e70597ef2ffd2847daa.tar.zst
dexon-sol-tools-1e07fcacacd760ce3dee1e70597ef2ffd2847daa.zip
Verify length on EIP712 signatures
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol3
1 files changed, 2 insertions, 1 deletions
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);