From 33d1dda954b68b88d563620d8e2d585c1a42fba9 Mon Sep 17 00:00:00 2001 From: Nik Bougalis Date: Thu, 2 Oct 2014 14:19:01 -0700 Subject: [PATCH] Handle BIGNUM conversion failure --- src/ripple/data/crypto/CKeyDeterministic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ripple/data/crypto/CKeyDeterministic.cpp b/src/ripple/data/crypto/CKeyDeterministic.cpp index 2b657758d3..1ce6eabf4a 100644 --- a/src/ripple/data/crypto/CKeyDeterministic.cpp +++ b/src/ripple/data/crypto/CKeyDeterministic.cpp @@ -40,7 +40,7 @@ uint128 CKey::PassPhraseToKey (std::string const& passPhrase) // --> seed // <-- private root generator + public root generator -EC_KEY* CKey::GenerateRootDeterministicKey (const uint128& seed) +EC_KEY* CKey::GenerateRootDeterministicKey (uint128 const& seed) { BN_CTX* ctx = BN_CTX_new (); @@ -92,6 +92,7 @@ EC_KEY* CKey::GenerateRootDeterministicKey (const uint128& seed) EC_KEY_free (pkey); BN_free (order); BN_CTX_free (ctx); + return nullptr; } root.zero ();