Browse Source

Merge pull request #600 from CJentzsch/bugfix

set first 12 bytes to zero in ecrecover
cl-refactor
Gav Wood 10 years ago
parent
commit
73e927e14a
  1. 2
      libethereum/State.cpp

2
libethereum/State.cpp

@ -67,7 +67,7 @@ bytes ecrecoverCode(bytesConstRef _in)
secp256k1_start();
if (secp256k1_ecdsa_recover_compact(in.hash.data(), 32, in.r.data(), pubkey, &pubkeylen, 0, (int)(u256)in.v - 27))
ret = dev::sha3(bytesConstRef(&(pubkey[1]), 64));
memset(ret.data(), 0, 12);
return ret.asBytes();
}

Loading…
Cancel
Save