From e989cdaf367715985a59c990b7db8260c415dc0c Mon Sep 17 00:00:00 2001 From: subtly Date: Sat, 4 Jul 2015 15:18:15 -0400 Subject: [PATCH] use local integer for v parameter of signature --- libdevcrypto/Common.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libdevcrypto/Common.cpp b/libdevcrypto/Common.cpp index eca0521cf..219b28f3a 100644 --- a/libdevcrypto/Common.cpp +++ b/libdevcrypto/Common.cpp @@ -198,8 +198,10 @@ Signature dev::sign(Secret const& _k, h256 const& _hash) { #ifdef ETH_HAVE_SECP256K1 Signature s; - if (!secp256k1_ecdsa_sign_compact(_hash.data(), h256::size, s.data(), _k.data(), Nonce::get().data(), (int*)(s.data()+64))) + int v; + if (!secp256k1_ecdsa_sign_compact(_hash.data(), h256::size, s.data(), _k.data(), Nonce::get().data(), &v)) return Signature(); + s[64] = v; return s; #else return s_secp256k1pp.sign(_k, _hash);