git://git.novaco.in
/
novacoin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Workaround for BN_bn2mpi reading/writing out of bounds
[novacoin.git]
/
src
/
bignum.h
diff --git
a/src/bignum.h
b/src/bignum.h
index
1a2406b
..
6e8d3cb
100644
(file)
--- 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]);