Use broad exception catch due to coincurve

pull/326/head
Nikhil Parasaram 6 years ago
parent a3b530ca24
commit d4417a24b3
  1. 4
      mythril/laser/ethereum/natives.py

@ -2,6 +2,7 @@
import copy import copy
import hashlib import hashlib
import logging
from ethereum.utils import ecrecover_to_pub from ethereum.utils import ecrecover_to_pub
from py_ecc.secp256k1 import N as secp256k1n from py_ecc.secp256k1 import N as secp256k1n
@ -43,7 +44,8 @@ def ecrecover(data):
return [] return []
try: try:
pub = ecrecover_to_pub(message, v, r, s) pub = ecrecover_to_pub(message, v, r, s)
except ValueError: except Exception as e:
logging.info("An error has occured while extracting public key: "+e)
return [] return []
o = [0] * 12 + [x for x in sha3(pub)[-20:]] o = [0] * 12 + [x for x in sha3(pub)[-20:]]
return o return o

Loading…
Cancel
Save