aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2012-02-19 09:22:11 -0800
committerPieter Wuille <[email protected]>2012-02-19 09:22:11 -0800
commite0b8d459b189ee2b7e95a47b217e4b02bfb523b3 (patch)
treef3b5f41d9c7b9348b285f9c422fe630bd30ff7eb /src
parentMerge pull request #865 from sipa/del_pwalletdb (diff)
parentWorkaround for BN_bn2mpi reading/writing out of bounds (diff)
downloaddiscoin-e0b8d459b189ee2b7e95a47b217e4b02bfb523b3.tar.xz
discoin-e0b8d459b189ee2b7e95a47b217e4b02bfb523b3.zip
Merge pull request #863 from sipa/bn2mpifix
Workaround for BN_bn2mpi reading/writing out of bounds
Diffstat (limited to 'src')
-rw-r--r--src/bignum.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bignum.h b/src/bignum.h
index 4143f6003..a750025f3 100644
--- a/src/bignum.h
+++ b/src/bignum.h
@@ -243,7 +243,7 @@ public:
std::vector<unsigned char> getvch() const
{
unsigned int nSize = BN_bn2mpi(this, NULL);
- if (nSize < 4)
+ if (nSize <= 4)
return std::vector<unsigned char>();
std::vector<unsigned char> vch(nSize);
BN_bn2mpi(this, &vch[0]);