From 227c7aae0f9d9779d5dbf7b5f962013ae3f7c465 Mon Sep 17 00:00:00 2001 From: Augusto Date: Thu, 15 Jun 2017 20:24:17 -0300 Subject: [PATCH] added check to ret boolean on ECRecovery --- contracts/ECRecovery.sol | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contracts/ECRecovery.sol b/contracts/ECRecovery.sol index 580e5a66d..bd4b162ee 100644 --- a/contracts/ECRecovery.sol +++ b/contracts/ECRecovery.sol @@ -62,7 +62,11 @@ library ECRecovery { bool ret; address addr; (ret, addr) = safeRecover(hash, v, r, s); - return addr; + + if (!ret) + return address(0); + else + return addr; } }